We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Geocoding

Development and Programming

liquilife's avatar
liquilife
147 posts
13 years ago
liquilife's avatar liquilife

Grant, I tried that and it would exclude ones that did not meet the conditional but when one did match it would output with the word FALSE instead of the field name. And because FALSE is a non valid shortname for anything it would show up in the output:

{if FALSE !=""} stuff here {/if}

I tried several variants including:

{field_name_raw}{if longitude != ""}{longitute} {latitude}{/if}{/field_name_raw}

All got me the same results.. it kept returning FALSE in my conditional.

       
grantmx's avatar
grantmx
1,439 posts
13 years ago
grantmx's avatar grantmx

Interesting. Then that sounds like a question for Mark to what to test the field against.

       
adro's avatar
adro
110 posts
13 years ago
adro's avatar adro

Is there a way to use this extension in stand-alone entry forms?

       
Eric Barstad's avatar
Eric Barstad
198 posts
13 years ago
Eric Barstad's avatar Eric Barstad

I’m sorry if I missed it in the thread, but is it possible to output one map with several points on it? For example, if I have ten weblog entries, all with their own Geo points, can I output a single map that displays all those points? Or, is this simply a one map per entry kind of thing?

       
leadsuccess's avatar
leadsuccess
408 posts
13 years ago
leadsuccess's avatar leadsuccess

This is a very cool extension, kudos!

It is cool but I am wondering how easy it is to dumb down. I have custom address fields already and would like to simply use those, that way the person entering does not have to jump to another field and enter the address in again. The way I was thinking is to have the processing of the geocoding like this.

Mark’s geo field basically becomes an entry spot for the custom fields you want to process per custom field group seperated by commas. So if you have (local_address, local_city, local_state) fields you would enter in Mark’s field (local_address, local_city, local_state) as default when creating the geo field, so no map just the field. Then it’s easier to use in SAEF with your own custom fields and assign them to run through that field. It would just take those fields you specify and run the geocoding with Mark’s extension, everything else as normal.

Am I thinking in the right direction, it’s bascially a whole new extension built on Mark’s code but Mark would have to modify it after all it’s his extension to do so. I am more an ideas guy and know enough PHP to blow up a cake:)

       
ropeadope's avatar
ropeadope
98 posts
13 years ago
ropeadope's avatar ropeadope

I cannot get the ‘Zoom’ feature to work at all (under Extension > Settings). I’ve tried multiple values from 1 - 200 and none seem to affect the display of the map. Anyone able to get this to work?

Thanks!

       
adro's avatar
adro
110 posts
13 years ago
adro's avatar adro

arty, I used this extension a while back and I’m pretty sure I experienced a similar problem…Instead of using the extension tags to generate the code, you might want to just hardcode it and include the zoom manually.



For the map.setCenter change the number 7 at the end to your required zoom level.

map.addControl(new GLargeMapControl()); 
      map.addControl(new GMapTypeControl()); 
      map.setCenter(new GLatLng(43.670906, -79.393331),7);
       
ropeadope's avatar
ropeadope
98 posts
13 years ago
ropeadope's avatar ropeadope

Thanks adro. Is that the full code? I just tried it in my template and I get nothing…

Also, inside the code you pasted I see two instances of ‘[removed]’. What is that?

       
adro's avatar
adro
110 posts
13 years ago
adro's avatar adro

Hmmmm….looks like the forum stripped some of the code.

I’ve uploaded a txt file with the code in it for you to paste..you can find it here

Just replace all the relevant weblog entry tags with your weblog names. Also, don’t for get to have the google maps api key in the head of your template. If you don’t have one, you can get one for your domain here: http://code.google.com/apis/maps/signup.html

       
adro's avatar
adro
110 posts
13 years ago
adro's avatar adro

sorry, had the wrong link for the txt file…the last post has been updated

       
allgood2's avatar
allgood2
427 posts
13 years ago
allgood2's avatar allgood2

Two questions:

(1) Is it possible to adjust the pin information on the map. Like specify it display an event and location name. So clicking on the pin you get a pop-up with something like: MyEvent; Union Square Plaza; 128 Main St., Chicago, IL, #####. So far my pin(s) aren’t displaying anything; also

(2) Is there an example of how to use the raw data to output multiple pins to a single map? Has anyone done this and are you willing to share?

Thanks

       
adro's avatar
adro
110 posts
13 years ago
adro's avatar adro

Yes, it is definitely possible. Firstly, you’ll need to add custom fields for each piece of info…(ie Location, Date, Time, Address, etc) …The way I was able to get this to work, was by hardcoding the entire google maps code, rather than using the one generated by the geocoding extension.

Once you do that, you can add the chunk of code for adding markers (you referred to them as pins) and basically just slap some {exp:weblog entries} tags in there to pull the location info from the custom fields you made.

It’d look something like this:



Don’t forget to append ‘_raw’ after the location field tag pair. Hope that helps

       
allgood2's avatar
allgood2
427 posts
13 years ago
allgood2's avatar allgood2

Okay, I guess I’m missing something. How did you hard code the google maps code? Is that the original code Google provides you when you get your API key? Did you add to the header, or right where you want the map to print? Also is that last } necessary or a mistake?

       
adro's avatar
adro
110 posts
13 years ago
adro's avatar adro

Create a template specifically for the Google map itself, and then you can embed that wherever you want…This template is where you’ll put the javascript for the Google mapo.

Here’s what you gotta do:

1) Create a template for the map 2) Copy/paste the code found here into your Google map template 3) In the <head> you’ll see the spot for your unique Google Api key…replace the text YOUR KEY HERE with the key that Google gives you 4) Replace the fields and weblog names with YOURS 5) Save this template as “gmap” or whatever and embed it wherever you need the map

Hope that helps

       
allgood2's avatar
allgood2
427 posts
13 years ago
allgood2's avatar allgood2

Hi adro. Thanks so much for your help. I have it almost working. I keep getting a rejection message from Google Maps about my API key. Which I don’t understand. I even generated a new key. But from what I can tell; the other code is working fine. I see the map points in the code, just no map because of the Google reject. So I’m working on that. May have to go to Google forums for it though, because the key worked with Phoogle.

       
First 8 9 10 11 12

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.