7 of 8
7
Geocoding
Posted: 21 January 2008 11:05 PM   [ Ignore ]   [ # 109 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007
deronsizemore - 21 January 2008 11:00 PM

Hey Steven,

What do you mean that you get a text field on yours?

Thanks

See attached image of my CP…

Image Attachments
New Entry | ExpressionEngine_1200978263499.png
Click thumbnail to see full-size image
 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 21 January 2008 11:07 PM   [ Ignore ]   [ # 110 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1562
Joined  08-02-2006

Ah, ok. Maybe I’m confused altogether then on what this add-on does. I was thinking this was something I could use in full entry template and it would output a map based on an address which was located in a custom field. I wasn’t aware this put a map inside the publish page…

Or does it do both?

Thanks

 Signature 

Deron Sizemore
==========
Random Jabber | Sizcons | NiceStylesheet | Kentucky Golfing | LogoGala
Twitter: Deron Sizemore | LogoGala

Profile
 
 
Posted: 21 January 2008 11:13 PM   [ Ignore ]   [ # 111 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007

I think the idea is that you stick a pin in the location. The map helps you do that.

It also outputs a map on the template too based on the location you selected for that entry.

What I want is something that can return a map based on some custom address field contents.

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 21 January 2008 11:15 PM   [ Ignore ]   [ # 112 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1562
Joined  08-02-2006
stinhambo - 21 January 2008 11:13 PM

I think the idea is that you stick a pin in the location. The map helps you do that.

It also outputs a map on the template too based on the location you selected for that entry.


Got ya

stinhambo - 21 January 2008 11:13 PM

What I want is something that can return a map based on some custom address field contents.

Yes, this is what I’m after too! smile This is what I was hoping the geocoding add-on did.

 Signature 

Deron Sizemore
==========
Random Jabber | Sizcons | NiceStylesheet | Kentucky Golfing | LogoGala
Twitter: Deron Sizemore | LogoGala

Profile
 
 
Posted: 21 January 2008 11:27 PM   [ Ignore ]   [ # 113 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007

I am working on something and if it works I’ll post it here smile

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 21 January 2008 11:28 PM   [ Ignore ]   [ # 114 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1562
Joined  08-02-2006

Awesome! I’d appreciate that. smile

 Signature 

Deron Sizemore
==========
Random Jabber | Sizcons | NiceStylesheet | Kentucky Golfing | LogoGala
Twitter: Deron Sizemore | LogoGala

Profile
 
 
Posted: 21 January 2008 11:41 PM   [ Ignore ]   [ # 115 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007

No problems!

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 25 January 2008 02:23 PM   [ Ignore ]   [ # 116 ]  
Lab Technician
RankRankRankRank
Total Posts:  1015
Joined  03-25-2005

Just a quick question on map extensions. There are two out, this one and Livelook. They are both a tad problematical yet.

I did a template where it takes the address value from a custom field in the entry, and gets the lat/lng from google as a php variable, then using that it updates the lat/lng custom fields in the database.

Added a link to the top of the control panel “geocode”. When doing a page for a map, the client writes the article as usual, adds the address in the address field and saves the entry.
Then click on geocode which opens that template and it does the magic and says, “All done, database updated for “entryname”,
and the lat/lng fields are filled in automatically.

I thought an extension may/would be better, just wonder if there are too many inherent problems…this way one has the address and coordinates in db and custom fields and can do whatever wanted.

 Signature 

BKDesign Solutions - Learn XHTML and use   Web Standards to build accessible websites that validate

Profile
 
 
Posted: 02 February 2008 09:42 PM   [ Ignore ]   [ # 117 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1726
Joined  03-26-2006
mmjaeger - 17 November 2007 05:02 AM

I’d like to create a link to google maps or maybe use some lightbox script. I understand that in need to pass all the necessary parameters to the script or google maps window. what I was wondering whether there is a way to use this

{office_location_raw} {latitude}, {longitude} {/office_location_raw}

but also get the zoom and maybe user api code.

I agree - I need this as well. I really need to get the zoom out of the custom field. Is there a quick addition I can make to the file so that I can simply return the {zoom} in addition to {latitude} and {longitude}? The API code would be a bonus, but I think the zoom is essential for what I’m trying to do.

Having a {sarcasm}wonderful time{/sarcasm} trying to get a google map to work in a Thickbox iframe - or any other initially hidden window/div/element. It’s darn near impossible, but I’ve seen a couple working examples and I don’t think I can make it happen with the default code this extension spits out - so I need to go raw. Thanks.

 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 02 February 2008 09:49 PM   [ Ignore ]   [ # 118 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007

What is the problem with getting Google Maps working in a Thickbox?

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 02 February 2008 10:02 PM   [ Ignore ]   [ # 119 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1726
Joined  03-26-2006

Have you ever tried getting a google map to show correctly in an element that is initially hidden (whether div, thickbox, hidden tab, whatever) or initially has no ‘size’? If not, I hope you have plenty of hair, because you’re going to pull out a lot of it. Basically the map won’t recenter correctly so much or all of it will be gray, and points won’t be drawn…I’m running into all of it.

Working on a real estate site and we wanted the map initially hidden. First in a tab, then I tried a simple slideToggle (I’m using jquery) and now I’m trying Thickbox iframe becaues I found one working example out there I thought I could mimic, but the way the Geocoding outputs the code isn’t helping me mimic what works at this point.

By the way, if you have tried this, and gotten it to work, I would love to hear how.

(If this conversation continues, we should probably go to PM or a new thread, unless it involves getting the zoom out of the _raw tags)

(Attached is a sample pic from FF/Mac)

UPDATE: Looks like I had to use an older version of Thickbox (2.0) to get it working. I was using the latest (3.1).

Image Attachments
ffox.jpg
Click thumbnail to see full-size image
 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 02 February 2008 10:32 PM   [ Ignore ]   [ # 120 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007

I would have thought the newer version of Thickbox might have done the trick as you can pass variables to it. I haven’t tried this yet though.

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 02 February 2008 10:38 PM   [ Ignore ]   [ # 121 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1726
Joined  03-26-2006

Yeah, me too! Except I just spent hours finding out it doesn’t, I don’t think. One thing I did find was that If I try to override the default output like so:

{prop_geolocation width="700" height="300"}


Nothing gets returned in the Thickbox, at least in FF. Removing parameters and using the defaults allowed it to work. So I set the default size to much larger than the Thickbox.

Crazy stuff. You wouldn’t believe how much googling I’ve done on this subject. Too much…it’s a freaking map!

 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 02 February 2008 10:43 PM   [ Ignore ]   [ # 122 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1590
Joined  01-05-2007

I’m sure it’s something worth sharing though smile

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 02 February 2008 11:17 PM   [ Ignore ]   [ # 123 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1726
Joined  03-26-2006

For the record, if you’re trying to get a google map to load in a Thickbox using Thickbox 3.1, you need to comment out two lines (first and last here):

// if($.browser.safari){//safari needs help because it will not fire iframe onload
     
$("#TB_load").remove();
     $(
"#TB_window").css({display:"block"});
// }


Those are around line 229.

And now, because I feel so great about all the hours this took, I’ll share how I’m calling up the map. Obviously, I have Mark Huot’s Geo extension installed. I set the default width and height to 100% (instead of 300px) by changing these lines (around 557) in ext.geo.php:

$width = $this->fetch_param('width')!='' ? $this->fetch_param('width') : "100%";
$height = $this->fetch_param('height')!='' ? $this->fetch_param('height') : "100%";

I’ve also got jquery and thickbox all happening up in here. So….

1) User visits real estate page
They say “Aw , cool, where is this swanky piece of real estate at? They see a link like this:

On the HTML page:

http://site.com/property/map/402/?KeepThis=true&TB_iframe=true&height=300&width=600

Under the hood (on the template):

{if prop_geolocation}
<a class="thickbox" href="{path=property/map}{entry_id}/?KeepThis=true&TB_iframe=true&height=300&width=600">
Click to view Map &raquo;</a>
{/if}

So, we’ll be calling the map template and it will be looking at {segment_3} for the entry id.

2) Amazing map reveals itself
Behold. (See attached pic of this actually working in FireFox/Mac. What does the map template look like, you say? Glad you asked, I feel like sharing.

Map Template
A little bit edited for clarity, but all the good bits left in:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset={charset}" />
<
title>The Realty Company</title>

<
style type="text/css">
html, body {
    width
: 100%;
    
height: 100%;
    
overflow: hidden;
    
padding: 0;
    
margin: 0;
    
}

body {
    position
: absolute;
    
}

body
* {
    margin
: 0;
    
padding: 0;
    
}

#gmap {
    
width: 100%;
    
height: 100%;
    
padding: 0;
    
overflow: hidden;
    
}
#gmap > div { overflow: visible; }
</style>
</
head>

<
body>
<
div id="gmap">
{exp:weblog:entries weblog="property" entry_id="{segment_3}"}
{prop_geolocation}
{
/exp:weblog:entries}
</div>
</
body>
</
html>


That’s it. School’s out and I have 3288 characters remaining!
May you have an easier time implementing than I did!

Image Attachments
amazingmap_firefox2.jpg
Click thumbnail to see full-size image
 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 03 February 2008 04:28 AM   [ Ignore ]   [ # 124 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6535
Joined  04-15-2006

Sorry to butt in on the end like this but just in case anyone hasn’t seen it before there is a script here that allows you to show co-ordinates in a Lightbox script. Maybe that could be made to work with your solutions too?

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 10 February 2008 12:51 PM   [ Ignore ]   [ # 125 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006

Hi Mark,

this extension breaks the Edit Alert Extension. But Derek Jones has suggested how it can be fixed.
http://expressionengine.com/forums/viewthread/54925/P18/#351744

Profile
 
 
Posted: 09 April 2008 12:02 AM   [ Ignore ]   [ # 126 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  596
Joined  12-10-2006

Invalid markup?

The validator seems to choke when I use this extension.

Error Line 259, Column 18: XML Parsing Error: StartTag: invalid element name .

if(suggestedZoom < 12) {

My pages are utf-8 / XHTML 1.0 Strict.

The ‘offending’ bit of script that the extension spits out is:

if(suggestedZoom < 12) {
map
.setCenter(new GLatLng(suggestedCenter.lat(), suggestedCenter.lng()), suggestedZoom);
}else{
map
.setCenter(new GLatLng(-34.224009653753, 150.97137451172), 12);
}

Has anyone else had this problem? (with xhtml 1.0 strict)

Profile
 
 
   
7 of 8
7
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64878 Total Logged-in Users: 63
Total Topics: 81804 Total Anonymous Users: 41
Total Replies: 439755 Total Guests: 294
Total Posts: 521559    
Members ( View Memberlist )
Newest Members:  pticketdxrsmdanbilly8hrkiliwysso50kexpressoKlaasdarrenstylestravelerjcaton