Extension talk:Maps/LQT Archive 1

No download link
Where is the code? The download location isn't mentioned. --Ryan lane 03:14, 16 July 2009 (UTC)

Found it in the announcement email; added it to the page. --Ryan lane 03:20, 16 July 2009 (UTC)

I do now see the documentation says not released. Heh. Oh well, too late ;).

Ok. Removed again. --Ryan lane 03:23, 16 July 2009 (UTC)

Multiple markers
Is it possible to show more than one display_point on a map without using the query functions of Semantic Maps? I see a display_points function is in the New Proposals section.

In an attempt to get multiple markers on a map, I installed Semantic Forms, but in trying example code with queries, I get no output on the wiki (and the wiki debug output doesn't show anything obvious). Perhaps I have the precedence wrong in LocalSettings.php, in which case here is the relevant snippet of that file:

# for SemanticMediaWiki include_once("$IP/extensions/SemanticMediaWiki/includes/SMW_Settings.php"); enableSemantics('tig.colorist.org'); # according to the Extension:Semantic Forms page, it goes here: include_once('extensions/SemanticForms/includes/SF_Settings.php'); require_once( "$IP/extensions/Maps/Maps.php" ); # Semantic Maps require_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );

Thank you for this extension, it will replace both GoogleMaps and the googlemap WikiWidget that I've been using.

--Robling 06:11, 25 July 2009 (UTC)

It is currently not possible to have multiple points on one map in Maps (hence the proposal for those new parser functions). For Semantic Maps to show up multiple queried coordinates onto one map, you do not need to have Semantic Forms. SF will simply make it considerably easier to insert coordinates, but is in no way required.

Both the multiple point parser functions and custom base layers for OpenLayers are apparently in high demand, and since the former should be available before the later, this will move up on my to-do list (possible for the 0.3 releases).

To solve your problem of no markers getting displayed on your map, I suggest you post your ask query here, which is probably the source of your problem.

--Jeroen De Dauw 15:12, 25 July 2009 (UTC)

Thank you for the prompt reply. The ask query is copied from the Semantic Maps examples page:

--Robling 16:47, 25 July 2009 (UTC)

Well, if the map doesn't show anything, it means their are either no results, or the results do not contain coordinate data. Make sure you have items in the Locations category with a 'Has coordinates' property of type 'geographical coordinate'. In a while I'll modify my demo wiki a little to make the query stuff more clear.

--Jeroen De Dauw 20:47, 25 July 2009 (UTC)

Where can I find out more about how the Locations category should be set up? I'm sheepishly afraid I missed that step in setting up Semantic Maps. Thanks in advance.

--Robling 22:48, 25 July 2009 (UTC)

Note that the category doesn't need to be named like that. It's just regular SMW stuff. If you have problems with this, you can have a look at the SMW manual. Try some stuff out with demo values and a table as result format. Once you can do that, you shouldn't have any problems doing the same with Semantic Maps.

--Jeroen De Dauw 11:15, 26 July 2009 (UTC)

Thanks Jeroen.

--Robling 14:50, 27 July 2009 (UTC)

cURL rather than URL in GoogleMaps API call
Maps not working for me. I get an error saying that URL file access is not allowed on my server. I investigated and the advice seems to be that file URL access is disabled by my hosting company for very good security reasons. I have been told that cURL should be used instead and this is a very simple change. Could this be done to Maps_GoogleGeocoder.php? Otherwise a lot of people will not be able to use this extension. http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/

Thanks! Mitchelln 13:40, 5 August 2009 (UTC)

Hey,

Thanks for the suggestion. You have a valid point. This will be resolved in the geocoders in version 0.3.

Cheers Jeroen De Dauw 19:36, 5 August 2009 (UTC)

Hey,

This issue has been resolved in the now published 0.3 release.

Cheers Jeroen De Dauw 22:00, 16 August 2009 (UTC)

Fantastic. I now have working maps :) Thanks a lot! Mitchelln 9:40, 18 August 2009 (UTC)

Google Flash API ?
Hi Jeroen

I recently came across the documentation pages for the Google Flash API. Some of the demos were impressive.

http://code.google.com/apis/maps/documentation/flash/

Is this something you are planning on incorporating eventually ?

- Laurent Alquier

Hey Laurent,

Thanks for the suggestion. Yahoo! Maps also has a flash API btw. Currently this stuff has low priority though, but it might get implemented in the distant future.

Cheers

-- Jeroen De Dauw 11:39, 12 September 2009 (UTC)

UK Postcodes consistently out on map.
Hi, I'm seeing a problem I also saw on the old version of this extension. UK Postcodes return a point that is consistantly about 0.5 miles out from the real location. However, if I type the postcode directly into google maps it shows correctly. Example: service=googlemaps The Postcode is for an address on Boundary Row, but it shows up on a nearby street called The Cut. The offset always seems to be about the same - to the left by about 0.5 miles. Any ideas? Also, I notice you get a different result depending on whether the postcode is SE1 8HP rather than SE18HP. A postcode parser problem? Thanks! Mitchelln 13:40, 25 August 2009 (GMT)
 * 1) display_address:
 * coordinates=
 * zoom=15
 * width=650
 * height=500
 * autozoom=off

Hey,

The geocoding and parsing of those postal codes is done by the used geocoding service. Maps does not do any work on that part, and therefore can not really fix the problem.

Cheers

-- Jeroen De Dauw 11:40, 12 September 2009 (UTC)

No result at all
Hi, I installed Maps and Semantic Maps but I don't get any result at all. With display_point with openlayers I get a grey area but that's the only sign that something is happening. I think I did everything that should be done: - Copy files to extension maps - Added 'includeonce' things in the right order - GoogleMapsKey after that

Or did I mis something? --AdSvS 14:38, 5 September 2009 (UTC)

Hey,

What version of Maps/SM are you using? Can you provide a link to your wiki? It's a little hard to determine your problem with so little info.

Cheers

--Jeroen De Dauw 21:05, 5 September 2009 (UTC)

The site is www.denhout.eu. I'm in the process of migrating from Semantic Google Maps, so you'll see some of both. I tried the Moscow example from your site and that didn't work. So it can't be that I had some bad parameter values or something like that. BTW: have a look at your recent changes. --AdSvS 09:20, 6 September 2009 (UTC)

Hey,

Can you also provide a link to a page where it is going wrong?

Cheers

--Jeroen De Dauw 10:42, 7 September 2009 (UTC)

Hi Jeroen, I created a user Jeroen, pw: Jeroen2009. On the user page I copied the Moscow example and as you can see nothing is happening. It should work also on 'Houts Archief' pages, of which you can choose one from the mainpage.

Thanks! --AdSvS 17:44, 7 September 2009 (UTC)

Files missing?
Hey,

Just noticed you simply appear to be missing some JS files. I suggest you delete the extensions/maps directory(and maybe the one of SM to) and re-upload the extension.

--Jeroen De Dauw 17:44, 9 September 2009 (UTC)


 * I think the problem is actually that your $wgScriptPath setting in LocalSettings.php is incorrect - it should be "", not "/wiki". Yaron Koren 19:10, 12 September 2009 (UTC)

Openlayers more general integration
Hello!

I'm interested in an openlayers object integrated into mediawiki pages but accessing our own map servers (this is an archaeological project creating site descriptions in a mediawiki system).

It would be nice to be able to include dynamic maps in mediawiki showing maps, layers (vector and raster) FROM OUR OWN servers (Geoserver).

I've read the Maps extension documentation and it seems that it mainly support google, yahoo and other map providers and geocoding and basic display. This is fine - but I need to access our own servers. Is it possible or targeted at all?

thanks in advance

Robert Kuszinger

Hey,

Maps indeed does not support the use of your own data sources ATM. This functionality is on the to-do list though. It's also true that Maps only supports basic display (markers) ATM. Adding new features to Maps that enable more complex display are also a to-do, but much less urgent.

If this is a high priority for you, and you are willing to (let others) do work on this functionality, be sure to contact me about it, so efforts can be coordinated.

Cheers

-- Jeroen De Dauw 16:53, 16 September 2009 (UTC)

Default parameter 'address=' required?
Hi, I installed version 0.3.4 of Maps and SemanticMaps on my wiki to replace SemanticGoogleMaps.

While it works ok, I found that it doesn't display any maps if some of the 'default parameters' (like address= or coordinates=) aren't explicitely given. This happens on my wiki as well as with the examples on the wiki.bn2vs.com/wiki/Maps or on the sandbox there.

So

is working while

doesn't display any map

Especially the openlayer examples on wiki.bn2vs.com are all missing the 'address=' parameter and therefore not displaying at all but simply showing an empty gray square.

Optimale 11:47, 17 September 2009 (UTC)

Hey,

You are right, that's not working, and it should be. It's a bug introduced in the latest release, 0.3.4, and has already been put onto the to-do list for the next release. I've fixed it already, since it was a minor issue, but haven't committed it yet since I'm having some problems with my SVN client. Hope to get it committed to SVN by this weekend.

Until then I suggest you do use the address= parameter. There's nothing wrong about that, and only typing a few extra chars.

Cheers

-- Jeroen De Dauw 21:54, 17 September 2009 (UTC)

Hey,

The bug fix has been commited to svn trunk.

Cheers

-- Jeroen De Dauw 15:46, 20 September 2009 (UTC)

HTML or Wikitext in labels
Hi, how can I use HTML or Wikitext for e.g. links in labels of points? I want something like the following:

But whenever characters like the apostrophe (') or the equals sign (=) is used, the display stops working. I'd like to have even more complex HTML or wikitext as label text, though. How can this be achieved?

Hey,

I'm aware of this problem. Quite a lot of characters can't be used in the parameter values sadly enough. (I'll probably add a list to the docs when I update them for the next version.) This seems to be a limitation of wikitext, non specific to Maps, but definitely more obvious in case of the title and label parameters.

I'm open to suggestions on how to solve this issue, cause ATM I don't see any non-hacky way to get around them.

Cheers

-- Jeroen De Dauw 16:58, 3 October 2009 (UTC)

Mandatory configuration parameters for relocated extension directory
If somebody uses the Short-URL feature for MediaWiki and/or has relocated the extension directory, then one has to supply access to the CSS and JS files from a couple of SMW extensions and the Maps extension, otherwise they won't work. I created a new directory called "mw-extensions" in my root and placed symlinks to all the affected extensions.

Here's what I had to add to my LocalSettings.php to make it all work again: $smwgScriptPath   = '/mw-extensions/SemanticMediaWiki'; $sfgScriptPath    = '/mw-extensions/SemanticForms'; $smgScriptPath    = '/mw-extensions/SemanticMaps'; $smgIncludePath   = $smgScriptPath; $egMapsScriptPath = '/mw-extensions/Maps'; $egMapsIncludePath = $egMapsScriptPath;

If you don't do this, then you'll get JavaScript errors for calls to addLoadEvent and/or initializeGoogleMap when trying to use the Maps extension.

Hey,

Are you suggesting a setting for the extensions dir should be created, or is already present and should be used in the mentioned extensions?

Cheers

-- Jeroen De Dauw 17:05, 3 October 2009 (UTC)


 * The functionality is already there, it's just documented nowhere. In case of the Maps extension, one has to set $egMapsScriptPath and $egMapsIncludePath to some URL that can be reached on the web server. In case of Semantic Maps, it's $smgScriptPath and $smgIncludePath. A little strange, maybe, is that there are two variables, while for the other SMW extensions there is typically only one. What's the difference between ScriptPath and IncludePath?

Hey,

You can change it that way, but it's not ideal. If you change your extensions directory (why would you want to do this actually?), you should only edit one variable, and not one for every extension.

The $egMapsIncludePath contains the full path, versus the relative one of $egMapsScriptPath. $egMapsIncludePath is indeed redundant though. Thanks for noticing.

Cheers

-- Jeroen De Dauw 10:34, 4 October 2009 (UTC)


 * Not my decision, it's the default when one installs MediaWiki in Debian or Ubuntu through their package repositories. The mediawiki files are in /var/lib, the extension directory as well in its own directory, the web-visible files are in /usr/share with symlinks to /var/lib and the actual MediaWiki configuration and extension directory that is being used is in /etc. They tried to abstract the MediaWiki software and extensions by this and make extension loading more modular, too. It's a nice attempt, but it breaks a lot of things, and I am not too happy with it.

I've removed this redundancy. It won't be present any more in next release.

Cheers

-- Jeroen De Dauw 11:03, 4 October 2009 (UTC)