Extension talk:Semantic Google Maps

Possible bug when using #show with #geocode
The #show function can be used to retrieve properties that were set on the current page. For example you could have:  . It seems to work fine. Also I've found that #geocode works, given a postal address it gets the longitude and latitude. However, I've found that when I combine #show with #geocode, something like: it sometimes works, for example when it is all wrapped up in a template, but very often it does not work. To see an example of this bug on a page, have a look at this page

My question: is there a way to get #show and #geocode to work together consistently? Pnelnik 11:57, 16 March 2009 (UTC)

Automate geotagging
I would guess that most wiki's that use sematic google maps would like any points that they mark on the map to be geo-tagged. That would enable search engines which use the physical location would pick up the fact that the given page refers to a particular physical location. I wonder could get get the geo-tag added automatically when a semantic google map is created? Perhaps it could be an optional parameter. Pnelnik 13:10, 24 February 2009 (UTC)


 * What do you mean by geotagging? Yaron Koren 15:04, 24 February 2009 (UTC)


 * There's an article on Geotagging in wikipedia. It is the process of adding geographical identification metadata to various media such as photographs, video, websites, or RSS feeds and is a form of geospatial metadata. These data usually consist of latitude and longitude coordinates, though they can also include altitude, bearing, accuracy data, and place names. Geotagging can help users find a wide variety of location-specific information. For instance, one can find images taken near a given location by entering latitude and longitude coordinates into a Geotagging-enabled image search engine. Geotagging-enabled information services can also potentially be used to find location-based news, websites, or other resources. Pnelnik 16:08, 24 February 2009 (UTC


 * Yes, but isn't that what placing coordinates on a page does already? Yaron Koren 17:13, 24 February 2009 (UTC)


 * I wonder will the external search engines, such as google, pick up the co-ordinates if they are not displayed either in a semantic data fact box or explicity? Pnelnik 11:52, 26 February 2009 (UTC)


 * Okay, now I understand - do you know what tag or tags would need to be added? Yaron Koren 18:36, 26 February 2009 (UTC)

Problems with Multidomain Website / Wrong API key
I have a page that is accessible through different domains. Because I have to use different keys for any domain I created a switch/case with all domains and the matching keys. In fact that onl works when I'm logged in in Firefox, when beeing logged in with IE it also does not work. So maybe there could be an option so that always the right Google-API-Key is used when accessing the page. Another problem is taht when the API-Key does not match a blank page is displayed, thats really horrible because the visitors are send to nothing and have no idea what is happening. So please help me as fast as possible becuase this is a very heavy problem. --DaSch


 * The easiest solution is to add an if-statement to your LocalSettings.php file, setting the value of $wgGoogleMapsAPIKey depending on the domain name. Yaron Koren 14:35, 28 January 2009 (UTC)

I made this. But it only works when I'm logged in. Even other users beeing logged in are getting an error. So I'm not sure if this is checked with every page beeing loaded. --DaSch 16:12, 28 January 2009 (UTC)


 * Sorry, I don't know what to tell you. There's no special domain-checking PHP code that can be run in the extension but can't be run in LocalSettings.php. Yaron Koren 18:13, 28 January 2009 (UTC)


 * Yes sure, but the effects are very strange and by know a had to disable the extension because pages with a map are displayed blank. --DaSch 19:30, 28 January 2009 (UTC)


 * Yeah, that's true - the error-handling could be better. Yaron Koren 20:09, 28 January 2009 (UTC)


 * Well, it seams that the $_SERVER['SERVER_NAME'] parameter not always gives the correct domain, so i changed it to only taking the tld. that works. Maybe the www was not always there or something like this. --DaSch 11:55, 30 January 2009 (UTC)


 * Well, no the error is getting even stranger. On some pages the API-Key is not right. The same page is displayed in Safari with no error an not displayed in Opera because of a wrong API-Key, other pages work the other way, not in Safari but in Opera. Maybe the handling of the API-Key is somewhere buggy. Is it maybe cached somewhere? There also seams to be a bug within IE so that the $_SERVER['SERVER_NAME'] is giving a wrong value. Maybe there could be a possibility to check the domain by javascript at runtime. And the configuration would be with an array of domain and key. Then the script could check for hostname in the request and take the right API-Key. By the way, I think maybe it would be better to have a alternative to GoogleMaps with similar functions, without the API-Key Problems and Google and so on. --DaSch 15:57, 30 January 2009 (UTC)


 * I think now i solved the problem. The thing is that you get a different API-Key when giving a subdirectory. So when generating the API-Key you have to use http://domain.tld/wiki and not http://domain.tld/ because this does not always work. I hope this is my last posting to this problem :) .--DaSch 10:49, 3 February 2009 (UTC)


 * I think the problem is that the keys are cached. So when I preview the page I have another path when viewing the page. Then the wrong key is already cached and the map is not displayed because of using the wrong cached key. --DaSch 18:58, 25 March 2009 (UTC)


 * Yes, chunks of parser function output (including Google API key) are always cached so if you want to avoid it, the only way for you to fix it in current version is to disable caching which I don't recommend. The other solution is to tweak the code so API key is determined in JavaScript and not on the server side, but it'll require some customizations to extension code and logic. --Sergey Chernyshev 19:25, 25 March 2009 (UTC)

Sidebar
Is there a way to add sidebar to the map? I have a map here http://www.transitunlimited.org/Downtown_San_Jose#Map which shows various places in an area. The map isn't very useful if someone can't look for a place by name and see where it is. (The map does well in terms of looking up a street and see the marker located near there.) 24.4.95.191 07:53, 25 February 2009 (UTC)


 * There's no way to do that, but that might be an interesting idea, possibly using the Local Search control. Yaron Koren 20:54, 25 February 2009 (UTC)


 * I am thinking towards something like this: http://econym.googlepages.com/example_map2.htm or http://econym.googlepages.com/example_map2b.htm


 * I think it needs to have a div and an array to collect the markers. I played with the codes but couldn't get any results.24.4.95.191 03:32, 26 February 2009 (UTC)
 * Oh, I understand - you want a sidebar that lists all the locations. Yeah, that would be nice; let me know if you make any progress. Yaron Koren 05:19, 26 February 2009 (UTC)

OpenStreetMap instead of Google Maps?
Do you happen to know what it would take to get this extension to work with OpenStreetMap instead of Google Maps? Thanks. &mdash;Fleminra 20:21, 14 March 2009 (UTC)


 * This would most likely have to be done using the OpenLayers library, which is handled by the Semantic Layers extension. Unfortunately that extension hasn't been updated in a while, though. Yaron Koren 20:41, 15 March 2009 (UTC)