Extension talk:Google Maps/Syntax

>> You can host your own collection of icons on your server, but note that they'll have the same >> anchor points as Google's default icon

Can someone tell how to exactly use custom icons? I have downloaded a set and have them in a folder on the site. Where does the icons attribute go?


 * I wanna know, too. See below.

how to use multiple icons?
Hi

Does anyone know how to use multiple icons? I want to use 4 different coloured icons to distinguish between the different locations on the map.

SoftDux 16:23, 23 March 2007 (UTC)

Try something like this:

 (H) 52.034277, 5.167522, Houten (O) 52.053321, 5.23972, Odijk Vic, 11:09, 12 June 2007 (UTC)

Thanx, that helped a bit :)

Now I just need to figure out how to get the icons to "auto display" when I hover over them, instead of having to click on each one


 * Have you found out how to autodisplay them? 09:12, 10 July 2007 (UTC) en:User:JanCK

my own icon set
You can host your own collection of icons on your server, but note that they'll have the same anchor points as Google's default icon.
 * What's that syntax for icons at my own server? I tried

(http://myserver.com/mypicture.gif) 52.053321, 5.23972, Odijk and http://myserver.com/mypicture.gif 52.053321, 5.23972, Odijk both didn't work. Maybe I may not use gifs, or a specific size is required? 09:12, 10 July 2007 (UTC) en:User:JanCK

I just had a look at the source code and I don't see how it could work. It first checks whether the line you wrote matches preg_match("/^(?:\(([.a-zA-Z0-9_-]*?)\) *)?([^,]+), *([^ ,]+)(?:, (.+))?/", $line, $matches)) Anyone familiar with RegExp? Would   (http://myserver.com/mypicture.gif) 52.053321, 5.23972, Odijk match this pattern? The other two alternatives, that are checked, are:  preg_match('/^\/([^\\\\]+)\\\\ *(.*)$/', $line, $matches)) for tabs and preg_match("/^(#[0-9a-fA-F]{6})/", $line, $matches)) for polygon lines. With $o = array("icons" => "http://maps.google.com/mapfiles/marker{label}.png",    "icon" => "http://www.google.com/mapfiles/marker.png",    ); It goes on:

$output .= googleMaps_AddMarker($lat, $lon, $icon, 'SMALLERTHANdiv style="direction: rtl;">'.$parsed->getText.'SMALLERTHAN/div>', $color, $tabs); $icon = $matches[1]; if ($icon && !$icons[$icon]) { // need to create this icon, since we haven't already $output .= " mapIcons['{$icon}'] = new GIcon(G_DEFAULT_ICON, '".addslashes(str_replace("{label}", $icon, $o['icons']))."');"; $icons[$icon] = true; } $output .= " marker = new GMarker(new GLatLng({$lat}, {$lon}), { 'icon':mapIcons['{$icon}'], 'clickable':false });";

solutions?
It seem to me that if ($icon && !$icons[$icon]) { // need to create this icon, since we haven't already $output .= " mapIcons['{$icon}'] = new GIcon(G_DEFAULT_ICON, '".addslashes(str_replace("{label}", $icon, $o['icons']))."');"; $icons[$icon] = true; } should be replaced with something like if (preg_match("/^([A-Z])/", $icon, $null) && !$icons[$icon]) { // need to create this icon, since we haven't already $output .= " mapIcons['{$icon}'] = new GIcon(G_DEFAULT_ICON, '".addslashes(str_replace("{label}", $icon, $o['icons']))."');"; $icons[$icon] = true; } elseif {   if (&icon && !$icons[$icon]) { // need to create this icon, since we haven't already $output .= " mapIcons['{$icon}'] = new GIcon(G_DEFAULT_ICON, '".addslashes($icon)."');"; $icons[$icon] = true; }  } But I haven't tried it, nor do I know whether an array allows an arbitrary string as indexing argument. 09:55, 10 July 2007 (UTC) en:User:JanCK

Furthermore, I guess the regular expression doesn't allow ://, so probably that's gotta be changed, too.

solution!
Oh, I think I got it! You are not supposed to mix your icons with googles icons. You specify icons="http://myserver.com/marker{label}.png" and icons="http://myserver.com/marker.png" into the googlemaps tag and you'll than only use your own icons. 10:07, 10 July 2007 (UTC) en:User:JanCK

how to print the map + direction and way points
Hi all,

if i print an page with a map + way points or direction on it, the map is ok but there is no direction or way point printed, what do?

Tx

-

Custom Underlying Map
hey All i am developing a site for personal development and user usage but have come across very limited available for custom maps. I am looking to implement a custom map that is not geo-spatial nor is it a space map. It is a custom map that i am compiling from a game and have yet to find a solution that will allow me to upload my own rastered map for drilling into for detail perspective. I have found one site that has one ability but requires me to create a reference link to their site which increases the page load time. I need to have a rastered map image and then overlay GoogleMaps utility ontop of it for the drill down effect. As well i am looking to use the functionality of googlemaps for tagging and line developement ontop of this rastered image.

If any of you have an idea on this please direct me. I am currently using MapLib as my host renderer but it is limited in its ability due to page load time.

Using Alphabet markers breaks KML file...?
Hi,

If I make a marker like this:

(S) 42.711618, -73.205112

And then implement the KML file link, the resulting KML loads with an error about having no root element.

If I take the (S) away, the resulting KML file loads absolutely fine in Google Earth.

Is this a bug?

Thanks 118.92.235.22 03:46, 30 May 2008 (UTC)

Converting KML markup to wikicode?
I may not understand KML documents correctly but I am looking for a way to convert KML markup to Mediwiki code, not just to parse the document and have it display. Any extensions or tutiorals out there? I only could find a KML Export which coverts the wrong way for me. We would like to able to have users expand existing map point data and add new map points.

And one more thing... it appears that tabbing does not work correctly in Mediawiki 1.11.0 (at least not for me). The last tab is alway blank. So if I create 2 tabs, Tab One has content, Tab Two is blank. If I create 3 tabs, Tab One has content, Tab Two has content and Tab Three is blank, etc....

Hopefully this will be corrected when I upgrade to 1.12.0

Myotus 16:09, 7 August 2008 (UTC)