Extension talk:Maps/Flow archive/2016
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Archive
KML-File support in Maps
RESOLVED | |
Use the gkml parameter and provide an URL to it. See also this page for an example. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have looked for KML support but I found only deleted / blocked information. I have used kml=<url> but that does not work. After long searching I have found thet the correct subtax is gkml=<url>. I would suggest that you add an example in your map-examples.
Thx Harm.frielink (talk) 06:17, 7 February 2016 (UTC)
- So gkml=<url> works? [[kgh]] (talk) 12:21, 7 February 2016 (UTC)
- Yes, gkml=<URL> works. Henryfunk (talk) 14:00, 13 September 2016 (UTC)
- Thanks for confirming. An example is still needed [[kgh]] (talk) 19:24, 13 September 2016 (UTC)
- There are two examples on this page at my site:
- http://www.irhb.org/wiki/index.php/Derbyshire_place-names
- Here's the query that generates one of them:
{{#ask: [[Category:Derbyshire place-names]] |?Geopoint |format=map |width=500 |height=600 |gkml=http://www.irhb.org/wiki/kml/england/counties/derbyshire.kmz |types=roadmap,satellite,hybrid,terrain |controls=pan,zoom,type,scale,streetview |enablefullscreen=yes |copycoords=yes }}
- In both cases the KML shows historic county boundaries, for Derbyshire on the first map and for all of England on that below it. Henryfunk (talk) 15:13, 16 September 2016 (UTC)
- Thanks a lot. I took the liberty to also add your example to the official documentation for this. I hope this is ok with you. Cheers [[kgh]] (talk) 20:08, 17 September 2016 (UTC)
- Thanks. Perhaps it will bring a little more traffic to my site :-) Henryfunk (talk) 12:22, 19 September 2016 (UTC)
Languages showing on wiki according to the user
RESOLVED | |
It will be possible to explicitly set a language starting with version 3.5.0 of the Maps extension. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
We have noticed something new on the wiki. Previously all maps created on the wiki came out in english - they are now showing in the language of the user who created the map on the page.
If one of our users (from Bulgaria) creates a page all the place names are in Bulgarian. If I come along and edit the page and save then the map goes to English and so on.
How can I set it so that all maps will display in English ?
StampStudy Stampstudy (talk) 21:56, 8 February 2016 (UTC)
- Never heard or seen something like this before. I case you did not upgrade MediaWiki or the Maps extension recently I would not even be surprised if the Google API started to control this behaviour. In this case the ability to specify a language will indeed be a reasonable feature to have. Does this also happen with openlayers or just with googlemaps? Which versions do you use? [[kgh]] (talk) 22:36, 8 February 2016 (UTC)
- I have checked and I am using an outdated version of maps -- will try upgrade later today. Using Maps v2 and Mediawiki 1.24.
- We are only using google maps and we haven't updated either maps or mediawiki for a while - we only started noticing it in the last few days.
- Here is and example of a page that is in a different language. http://stampsoftheworld.co.uk/wiki/Bayard_%28US-FL%29 Stampstudy (talk) 07:50, 9 February 2016 (UTC)
- Well this confirms that Google itself must have changed something lately.
- Upgrading will not help since I also was able to replicate this behaviour on a wiki running the latest software. Thus I filed a issue on GitHub to make aware of this.
- Indeed the page now has either to be edited or purged to help the cause. [[kgh]] (talk) 14:32, 9 February 2016 (UTC)
- With the help of James Hong Kong I authored a pull request to address this issue. Now Jeroen De Dauw has to say ok to it. [[kgh]] (talk) 16:35, 9 February 2016 (UTC)
- Thanks Kghbln,
- I looked through the code and saw where maybe it should be set but my knowledge is limited. Maybe there will be a way to set the language in localsettings. Stampstudy (talk) 19:29, 9 February 2016 (UTC)
- It is the following line that changed from wgLang to wgContLang. Dunno if this file was already present in Maps 2.0. This change takes the "$wgLanguageCode" setting which makes a lot of sense - at least to me. [[kgh]] (talk) 20:43, 9 February 2016 (UTC)
- Checking the wiki today and all seems to be fixed - so google must have changed something back, I will monitor it. Stampstudy (talk) 15:16, 11 February 2016 (UTC)
- In the upcoming 3.5 version of Maps there will be a new configuration parameter
$egMapsGMaps3Language
which will allow you to explicitly set a language to be used when rendering the maps. [[kgh]] (talk) 15:57, 11 February 2016 (UTC) - Great stuff, thank you for all your help. Stampstudy (talk) 19:41, 11 February 2016 (UTC)
Markercluster not working?
RESOLVED | |
Fixed with version 3.6.0 of the Maps extension. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Versions:
http://csdms.colorado.edu/mediawiki-beta/index.php/Special:Version
Looks like Markercluster is not working: http://csdms.colorado.edu/mediawiki-beta/index.php/CCMP_Members_spatial
The numbers are provided per cluster but not the symbols anymore (did in the past). Did I miss something?
Thanks,
Albert. Albert Ke (talk) 13:51, 17 May 2016 (UTC)
- That's an issue that just came up. [[kgh]] (talk) 19:26, 17 May 2016 (UTC)
Possible to use without Composer?
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm having some difficulty using Composer to upload this extension to a wiki that is placed on shared hosting (I have no shell access). I don't suppose there is an alternative? Thanks! Bveremis (talk) 21:26, 6 June 2016 (UTC)
- Actually there is one - sort of. Install it to a MediaWiki on a machine which allows to use Composer and then move the files to your shared hosting. Note that since MW 1.25 the dependencies of MediaWiki themselves are managed via Composer too so you cannot do an isolated install of the extension but you have to do it in conjunction with MediaWiki itself to get the proper files for loading all dependencies needed. This is a painful process but not avoidable under these circumstances. [[kgh]] (talk) 21:59, 6 June 2016 (UTC)
- So to make sure I understand this correctly: I should basically transfer everything on my existing wiki on my shared hosting to my computer (on which I have XAMPP installed), run Composer to get maps, then transfer everything back? Bveremis (talk) 22:02, 6 June 2016 (UTC)
- Yes, that's how do it. Probably you should also have a test instance to check that this is working for you.
- Edit: Let me rephrase: Do a fresh install of the same MediaWiki branch including Maps on your XAMPP and move the files in /extensions/, /vendor/ over. [[kgh]] (talk) 22:03, 6 June 2016 (UTC)
Key required for Google Maps
RESOLVED | |
It will be possible to add a key starting with version 3.8.0 of the Maps extension. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
As of 22 June 2016, Google Maps require a key for new sites, i.e. sites first using Google Maps after that date. See https://developers.google.com/maps/pricing-and-plans/standard-plan-2016-update
Are there any plans to update the Maps extension?
In the meantime, you can get an API key for free from https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true
You can then edit the file "\extensions\Maps\includes\services\GoogleMaps3\Maps_GoogleMaps3.php". In the function "getApiScript", change the line:
"return Html::linkedScript( '//maps.googleapis.com/maps/api/js?' . wfArrayToCgi( $urlArgs ) );"
to:
"return Html::linkedScript( '//maps.googleapis.com/maps/api/js?key={YOURKEY}&v=3.24?' . wfArrayToCgi( $urlArgs ) );", replacing {YOURKEY} with the API key that was generated for you at the Google site.
By the way, Jeroen, thank you for all your good work.
Henrik (www.irhb.org) Henryfunk (talk) 17:48, 3 July 2016 (UTC)
- Thanks Henrik for making aware of this issue. I have added an item to the issue tracker of the Maps extension. Cheers [[kgh]] (talk) 08:25, 4 July 2016 (UTC)
- My pleasure :-) 194.192.151.254 (talk) 14:09, 4 July 2016 (UTC)
- @Henryfunk Could you test pull 180? [[kgh]] (talk) 14:35, 4 July 2016 (UTC)
- It tested OK: https://github.com/JeroenDeDauw/Maps/pull/180.
- Thanks! Henryfunk (talk) 16:12, 5 July 2016 (UTC)
- Well I have to thank you for doing a field test and providing feedback. :) [[kgh]] (talk) 20:12, 5 July 2016 (UTC)
How to change position of the map?
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I would like to the map will be displayed on the right side of th page.In the same way like images. NH35 (talk) 21:03, 7 August 2016 (UTC)
- Something like this should do it:
- [[kgh]] (talk) 19:19, 8 August 2016 (UTC)
<div style="float: right"> <display_map centre="new york city" service="openlayers"> </display_map> </div>
- Hi,
- Thank you for reply. I found a better solution
- NH35 (talk) 18:18, 9 August 2016 (UTC)
<div class="thumb tright"><div class="thumbinner" style="width:302px;">{{#display_map: Berlin, Germany }} </div></div>
Additional "elements" folder in the "vendor" folder
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Which component (Maps or Composer) created new "elements" directory in the "vendor" folder (vendor/oojs/oojs-ui/php/elements)? NH35 (talk) 12:32, 29 August 2016 (UTC)
Database changes?
RESOLVED | |
No extra database tables required. Thus "update.php" does not need to be run. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The wiki page says that the extension requires DB changes. After searching through the code, I still can't determine what they are. Can you please do either (1) point me to the correct file in the repo, or (2) fix the table to say no db changes. BrentLaabs (talk) 19:54, 3 September 2016 (UTC)
- Good find. Maps does not use extra database tables. I will change the info. Thanks [[kgh]] (talk) 20:08, 3 September 2016 (UTC)
- Thanks both! Jeroen De Dauw (talk) 17:17, 9 September 2016 (UTC)
Unexpected results with #display_map: when fed from semantic query
Hi,
sorry, the wiki I have isn't public so I can't provide a link. But I'll describe what I did and what the problem with the result is. So, I use the #display_map: call to get a map. I want to have lines drawn from various points to various other points, in different colours. The coordinates and Text associated with the lines come from a semantic query. The query uses a template, so the data is generated in the manner that #display_map: will draw them as lines.
I created a template used in the semantic query myself, to get the
coordinate1:coordinate2~ ~Text~Color;
It works fine for the 2nd result until the last, but the first result always is screwed-up. In the HTML-Source of the page I can see, that google gets three coordinates, resulting in an additional line.
[...]"pos":[{"lat":26.7380228,"lon":-11.684637},{"lat":42.0972345,"lon":-111.997471},{"lat":40.782777777778,"lon":-73.967222222222}]}[...]
The coordinates used should be 40.7828687,-73.9675438 and 38.8566241,-77.0270329. The first obviously appear correct, but the latter somehow turn into something unexpected.
Any help ?
Here is the call:
{{#display_map:
|lines={{#ask:[[Endpunkt 1::+]]
|?Endpunkt 1=Endpunkt1
|?Endpunkt 2=Endpunkt2
|?Bekanntheit
|?Hinweise
|?Caern 1
|?Caern 2
|sort=Endpunkt 1,Endpunkt 2
|format=template
|link=none
|headers=hide
|mainlabel=-
|sep=;
|template=Mondbrücken-Kartenausgabe
}};
|centre=46.5,-34.5
|maxzoom=14
|minzoom=2
|zoom=3
|geoservice=geonames
|width=auto
|height=750px
|type=earth
|types=hybrid,earth,physical,satellite
}}
Also, is there a way to stop the parser at some point. For I would like to see, for debugging, how the #ask:-query is resolved, without the #display_map: being rendered and without the #ask:-output being rendered as html.
Best Regards, Heinrich krebs (talk) 13:01, 20 October 2016 (UTC)
- Sorry I did not see this before. A better place is probably one of the mailing lists or file a bug report. As for the debugging I usually isolate the ask query from the other stuff and see if the expected results in terms of raw data are shown e.g. by using the table format. [[kgh]] (talk) 13:27, 30 January 2017 (UTC)
Maps 4.0.1 displays Leaflet/OpenStreetMap maps instead of GoogleMaps
RESOLVED | |
Starting with Maps 4.0 $egMapsDefaultService = 'googlemaps3'; has to be added to "LocalSettings.php" to use Google as service provider for maps. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
After I upgraded Mediawiki to version 1.28, Semantic MediaWiki to 2.4.2 and Maps to 4.01, Google Maps are no longer displayed; instead Leaflet/OpenStreetMaps maps are shown. The bug must be in the Maps extension. Putting the following line in my Localsettings file has no effect:
$GLOBALS['egMapsDefaultService'] = 'googlemaps3';
but if I instead change the line
$GLOBALS['egMapsDefaultService'] = 'leaflet';
in Maps_Settings.php to
$GLOBALS['egMapsDefaultService'] = 'googlemaps3';
then GoogleMaps are displayed as expected. The parameter value in Localsettings.php must be either ignored or overwritten by that in Maps_Settings.php.
As always: thank you for your good work!
Henrik Thiil Nielsen Henryfunk (talk) 18:21, 29 November 2016 (UTC)
- Hi, try to add
$egMapsDefaultService = 'googlemaps3';
to the "LocalSettings.php" file instead of this $GLOBALS stuff. Note that leaflet is indeed the default mapping service. Cheers [[kgh]] (talk) 21:14, 29 November 2016 (UTC) - Thanks! Henryfunk (talk) 17:02, 1 December 2016 (UTC)
Installing maps using the instructions on github causes update.php to fail
RESOLVED | |
Tracked with issue 296. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Got the maps extension installed and working as easy as you please, but when I went to add another extension requiring me to run update.php, the update script failed.
bash-4.2$ php maintenance/update.php MediaWiki 1.28.0 Updater mediawiki/maps: 4.0.2 installed, * required. Error: your composer.lock file is not up to date. Run "composer update" to install newer dependencies
With help from another user on IRC, I was able to require a specific version (4.0.2), which then allowed the update.php script to run. TroySettle (talk) 20:04, 4 December 2016 (UTC)
- Thanks for noting you troubles here. Admittedly I have never added
"mediawiki/maps": "*"
to my "composer.local.json" file which is indeed not recommended. Perhaps this was part of the issue. Anyway I am glad that it worked out for you in the end. [[kgh]] (talk) 20:38, 4 December 2016 (UTC) - I don't know about being recommended or not, but the instructions say to do it. IMO, that's a little more than a recommendation. TroySettle (talk) 10:49, 9 December 2016 (UTC)
- I guess you have a point. That info needs to be changed. [[kgh]] (talk) 11:19, 17 December 2016 (UTC)
- I file issue 296 for this. [[kgh]] (talk) 11:25, 17 December 2016 (UTC)
composer?
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Composer doesn't work at my Computer and i don't have an other one, but i want to use maps... what kind of "magical shit" do the composer? Why doesn't work wfLoadExtension( 'Maps' ); or require_once "$IP/extensions/Maps/Maps.php"; anymore? 178.1.140.190 (talk) 05:05, 17 December 2016 (UTC)
- The "magical shit" composer is doing is called installing and invoking the extension. Without it you are running out of luck I'm afraid. [[kgh]] (talk) 11:19, 17 December 2016 (UTC)
Geolocating Wiki Pages
RESOLVED | |
Use the semantic features provided by the Maps extension. Requires Semantic MediaWiki. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Dear folks, using Maps, is there a method for showing markers for each wiki page created. For example, I want to have one central map for our wiki. And each wiki page that is created, for example a wiki page on the "Fall of Rome" a marker would be auto placed on the central map in Rome, and if that marker is clicked on, you would be directed to the wiki page "Fall of Rome". So I know coordinate or lat and long values would have to be embedded into the wiki page "Fall of Rome" in order for it to populate the central map. Is this possible? Thanks for anyone who can help. John John Morris (talk) 19:48, 21 December 2016 (UTC)
- Yes, that's possible in conjunction with the use of Semantic MediaWiki. This is a very basic example querying for cities. [[kgh]] (talk) 17:50, 23 December 2016 (UTC)
- Thanks Kghbin, that is awesome! John Morris (talk) 15:37, 27 December 2016 (UTC)
- Now to study SM! John Morris (talk) 15:37, 27 December 2016 (UTC)
- Go for it! :) [[kgh]] (talk) 18:04, 3 January 2017 (UTC)