Stephen, here’s a feature request: International Google service support. There are some (paranoid and stupid) countries which forbid a map provider from exporting map data to a server located outside the borders of the country. I happen to know there are two of them – Korea and China – through my work. Both countries’ maps available through the maps.google.com server are bereft of detail. Yet if you go to maps.google.co.kr or maps.google.cn, respectively, very rich maps are available. An application setting or parameter to allow the field administrator to specify the server would be most helpful.
I found a work around for the time being. I put the map custom field call into an embed, and was able to use the {embed:entry_id}-google-map instead of the {entry_id} since {embed} variables are earlier parsed than normal weblog:entries variables.
So, working for now, but might be confusing for other in the future.
Stephen, here’s a feature request: International Google service support.
Well, that’s something I’d never heard about before. I’ll add it to the feature requests list Brendon, although it’s probably quite low down the pecking order, to be honest.
I put the map custom field call into an embed, and was able to use the {embed:entry_id}-google-map instead of the {entry_id} since {embed} variables are earlier parsed than normal weblog:entries variables.
Ok, thanks for letting me know AJ. That was going to be my next suggestion, as an interim measure. I’ll still try to find a more elegant solution, but at least you’ve got it working for now.
Cheers, Stephen
Fantastic work on this extension, Stephen. I love how easy it is (for me and my clients) to add Google Map info.
If I may, I’d like to offer a suggestion (and I’m thinking it may already be on your feature list): The ability to use the driving directions utility within the generated map. I think this probably falls under your item:
[quote author=”Stephen Lewis”] 4. Expose the Google Map events, to enable greater interaction with the maps — click on a pin, and a details box appears, that sort of thing.
I know for myself, having this ability would be absolutely fantastic.
I cannot enable SL Google Maps in the FieldFrame prefs. I get a show/hide link that doesn”t work (Safari, Mac). No radio button to enable the extension. Where’s the problem? In this extension or in FieldFrame?
See this discussion for further details.
Actually I just checked out Korea in maps.google.com and then maps.google.co.kr and unless I’m doing something woefully wrong the map on maps.google.com gave me a much better zoom resolution than the other site?
I can’t speak to your experience, Mark. For us it’s the opposite – the .co.kr site gives us a detailed map, while the .com site gives us no detail at all. Anyway, I would think that the ability to choose the server would be of general interest to international, non-English speaking users. Spanish, French, and German-language speakers, for example, find maps more useful when labelled in their languages even if the detail level is exactly the same.
@Ridge
If I may, I’d like to offer a suggestion (and I’m thinking it may already be on your feature list): The ability to use the driving directions utility within the generated map.
You’re right, that does fall under the broader goal of “exposing the Google Map events” 😊
@yvonne
I cannot enable SL Google Maps in the FieldFrame prefs. I get a show/hide link that doesn’‘t work (Safari, Mac). No radio button to enable the extension. Where’s the problem? In this extension or in FieldFrame?
Sounds more like a FieldFrame issue, as SL Google Map isn’t really doing anything at that point. Do you have jQuery for the Control Panel installed and enabled?
Cheers, Stephen
I love this extension, it’s exactly what I’ve needed and been looking for.
I am having a small issue pulling out the pin location though. Using the following block of sample code…
The current latitude and longitude of your map is {map_lat} and {map_lng}, respectively. The zoom-level is {map_zoom}.
The current latitude and longitude of your pin is {pin_lat} and {pin_lng}, respectively.
I get the following result.
The current latitude and longitude of your map is 40.74750080613109 and -74.00182485580444, respectively. The zoom-level is 16.
The current latitude and longitude of your pin is 40.74750080613109 and -74.00182485580444, respectively.
That is to say, the pin_lat/lng vars seem to be overwritten by those of the map. Curious as to why/how this could happen. Or maybe this is normal and to be expected for a centered map :-)
Also weird that when I try to build a link to the larger google map the pin doesn’t appear. Clicking on the google logo in the bottom left corner returns the same result - a large map with no pin. Maybe the maps API is having trouble today…
<a href="http://maps.google.com/maps?ll={map_lat},{map_lng}&spn={pin_lat},{pin_lng}&z={map_zoom}">View a larger map</a> or <a href="http://maps.google.com/maps?ll={map_lat},{map_lng}&spn={pin_lat},{pin_lng}&z={map_zoom}&pw=2">make a print of it.</a>
Actually I just checked out Korea in maps.google.com and then maps.google.co.kr and unless I’m doing something woefully wrong the map on maps.google.com gave me a much better zoom resolution than the other site?I can’t speak to your experience, Mark. For us it’s the opposite – the .co.kr site gives us a detailed map, while the .com site gives us no detail at all.
That’s just weird. I wonder why that is though? Perhaps some sort of licensing issue in different countries or something. Seems rather weird though.
Anyway, I would think that the ability to choose the server would be of general interest to international, non-English speaking users. Spanish, French, and German-language speakers, for example, find maps more useful when labelled in their languages even if the detail level is exactly the same.
Yep totally understand that, makes perfect sense.
Best wishes,
Mark
Hi goodcompany,
To answer each of your questions in turn:
That is to say, the pin_lat/lng vars seem to be overwritten by those of the map. Curious as to why/how this could happen. Or maybe this is normal and to be expected for a centered map 😊
Got it in one. If you drag the map off-centre in the Control Panel, and then save it, you’ll notice that the map and pin have different lat / lng values.
Also weird that when I try to build a link to the larger google map the pin doesn’t appear. Clicking on the google logo in the bottom left corner returns the same result - a large map with no pin. Maybe the maps API is having trouble today…
The following should work:
http://maps.google.com/maps?q={pin_lat},{pin_lng}&sll;={pin_lat},{pin_lng}&z={map_zoom}
Cheers, Stephen
Thanks, Stephan.
Good answers. But just a quick check for anyone reading this - does this give you a pin? 😊
http://maps.google.com/maps?ll=57.1032107,12.2905275&spn=57.1032107,12.2905275&z=16
I have the pin in my CP and on my site, it’s just not showing up here (for me). Again, maybe a hiccup in the API.
Good answers. But just a quick check for anyone reading this - does this give you a pin?
No, but using those coordinates with the URL structure I previously posted does.
I’m not overly familiar with the structure of the Google Map URLs in truth, and the URL I posted above was discovered by reading this Wiki article, and trial and error.
Stephen
Thanks, Stephan. Good answers. But just a quick check for anyone reading this - does this give you a pin? 😊 http://maps.google.com/maps?ll=57.1032107,12.2905275&spn=57.1032107,12.2905275&z=16 I have the pin in my CP and on my site, it’s just not showing up here (for me). Again, maybe a hiccup in the API.
If you change
maps?ll=
to
maps?q=
the pin shows.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.