Talk:Google Maps
From MediaWiki Widgets
Is it possible to enable Zoom using the scroll wheel? I tried adding map.enableScrollWheelZoom(); but it had no effect
- Added it to the widgets - works fine for me. Try it out. --Sergey Chernyshev 18:58, September 26, 2010 (MDT)
Every time I try to embed a map I get a message saying I need a new marker from the code.google.com/apis/maps page
BeeVee
- Yes, you need a key (not a marker) - there is a link from the "key" parameter description to the page on Google that allows you to get one for your domain. --Sergey Chernyshev 07:36, July 16, 2010 (MDT)
Integration with a coordinate template?
When my users add a map to an article with this widget, I'd like to have the same coordinates get passed to another template (based upon http://en.wikipedia.org/wiki/Template:Coord). I already have the Template:Coord working, but have not been able to find a way to invoke it within the widget's code. Thanks in advance for any advice. --Bawheeler 10:16, March 29, 2011 (MDT)
- You can give them another template to use instead where they pass coordinates on and that template will make a call to a widget, plus will call your other, Template:Coord template. --Sergey Chernyshev 10:08, March 30, 2011 (MDT)
Titles to markers
Hello,
Is it possible to add titles to markers ? Or at last, having markers with A,B,C, etc. symbols on it, so we can refer to them ? There is no point in adding half a dozen markers on a map if there is no explanation of what is which... -Ash Crow 10:09, September 15, 2011 (AST)
- OK, I figured out how to do this : I changed the line defining the markers to this :
<!--{foreach from=$marker item=m}-->map.addOverlay(new google.maps.Marker(new GLatLng('<!--{$m.lat|escape:'quotes'}-->', '<!--{$m.lng|escape:'quotes'}-->'),{title:'<!--{$m.title|escape:'quotes'}-->'}));<!--{/foreach}-->- -Ash Crow 10:29, September 15, 2011 (AST)
- Thank you! Added it to the widget. Adding custom icons might not be that hard too, BTW. --Sergey Chernyshev 00:57, September 16, 2011 (AST)
- The following works for basic lettered icons (A-Z):
- Thank you! Added it to the widget. Adding custom icons might not be that hard too, BTW. --Sergey Chernyshev 00:57, September 16, 2011 (AST)
<!--{foreach from=$marker item=m}-->var markerIcon=new GIcon(G_DEFAULT_ICON
<!--{if isset($m.letter)}-->,"http://www.google.com/mapfiles/marker" + '<!--{$m.letter|escape:'quotes'}-->' + ".png"<!--{/if}-->);
map.addOverlay(new google.maps.Marker(new GLatLng('<!--{$m.lat|escape:'quotes'}-->', '<!--{$m.lng|escape:'quotes'}-->'),{title:'<!--{$m.title|escape:'quotes'}-->',icon:markerIcon}));<!--{/foreach}-->
-Ash Crow 11:09, September 16, 2011 (AST)
- Can you add that? I'll then review and approve to post it live. --Sergey Chernyshev 12:06, September 16, 2011 (AST)
- Hello, I added the following parameters for markers : if "letter" is specified with "A-Z", it allows to use a classic lettered marker. If you want to use a custom icon, you can use the "icon" parameter with the full URL of the icon. If specified, "text" includes it's value in a popup balloon (html markup is interpreted, but not wiki markup, and I don't know how to do it :() -Ash Crow 07:33, September 21, 2011 (AST)
- Can you add that? I'll then review and approve to post it live. --Sergey Chernyshev 12:06, September 16, 2011 (AST)