Extension talk:Maps

Jump to navigation Jump to search

About this board

Archive

86.177.91.92 (talkcontribs)

Running Maps 7.1.0, I have a lot of maps but I'm finding that they never load first time. You just get a grey box with "Loading map", but nothing happens.

What's weird is that if you refresh the page, the map then instantly loads. What could be causing that?

Reply to "Map never loads first time"
194.96.92.160 (talkcontribs)

Any documentation available how to install additional Leaflet plugins?

Reply to "Leaflet Plugins ?"

Geocode and map showing the wrong location

3
Squeak24 (talkcontribs)

Hi,

I have put together a map that will place a marker down depending on what the user puts in form.

I have tried using the command for the geocode as:

{{#geocode:{{{Address}}}, {{{City}}}, {{{Country}}}}}

I then have this display on a map as:

{{#display_map:{{{Address}}}, {{{City}}}, {{{Country}}}~icon.png;}}

The address I am looking for is 123 5th Ave, New York City New York, United States, 10003

Breaking this down, the Address is 123 5th Ave, the City is New York City, the country is United states.

This address should be in Mid-Town Manhattan, but on the map, it is showing it as being in Brooklyn.

Also, I want to drop an marker down, in this instance I am using an icon.png, but it's not showing. I have tried using the default set up for Berlin and the marker has been dropped.

Any ideas what I am doing wrong?

Any help is appreciated.

Squeak24 (talkcontribs)

Ah, I see what I did wrong now. I have changed New York City to Manhattan. But still having issues with the marker

Squeak24 (talkcontribs)

I think I have sorted the marker issue out now.

Reply to "Geocode and map showing the wrong location"
Amcgilli (talkcontribs)

Can you do more than geographic mapping with this extension? For instance, I would like to be able to upload an image of the floor plan of our building, and map out the emergency exits. Does this extension make that possible?

Kghbln (talkcontribs)
71.202.172.3 (talkcontribs)

Brand new user...

I'm trying to get clustered points on a map of my city, but clusters never form -- even zoomed way out, I still have individual points.


What am I doing wrong?


Here is the markup


<display_map height="600px" service=leaflet geojson="TestBerkeley" markercluster=on>

  Berkeley, California~The city Berkeley~Berkeley is a really nice city

</display_map>


and here is the GeoJSON I made on GeoJson.io


{

    "type": "FeatureCollection",

    "features": [

        {

            "type": "Feature",

            "properties": {},

            "geometry": {

                "type": "Point",

                "coordinates": [

                    -122.27607250213622,

                    37.86702776467238

                ]

            }

        },

        {

            "type": "Feature",

            "properties": {},

            "geometry": {

                "type": "Point",

                "coordinates": [

                    -122.2758150100708,

                    37.867231038273935

                ]

            }

        },

        {

            "type": "Feature",

            "properties": {},

            "geometry": {

                "type": "Point",

                "coordinates": [

                    -122.27632999420166,

                    37.866824490510076

                ]

            }

        },

        {

            "type": "Feature",

            "properties": {},

            "geometry": {

                "type": "Point",

                "coordinates": [

                    -122.27422714233397,

                    37.87370162153638

                ]

            }

        },

        {

            "type": "Feature",

            "properties": {},

            "geometry": {

                "type": "Point",

                "coordinates": [

                    -122.28903293609619,

                    37.870584971740065

                ]

            }

        },

        {

            "type": "Feature",

            "properties": {},

            "geometry": {

                "type": "Point",

                "coordinates": [

                    -122.26929187774658,

                    37.85981118852664

                ]

            }

        }

    ]

}


71.202.172.3 (talkcontribs)

It appears to work if I don't use GeoJson.

Reply to "Cluster zoom not working"

Maps extension leaves parsing error with {{coord}}

10
Chapjo (talkcontribs)

Installing MAPS extension causes a call to {{coord}} to print this error; "Fatal error: The format of the coordinate could not be determined. Parsing failed." The {{coord}} continues to display correctly, however, the error message displays in a pink window below the coordinate.

Maps is installed via composer as the installation docs say. The only way I have been able to remove the error is to remove "mediawiki/maps" from composer.json AND reboot the server. The error will persist until machine is rebooted.

Hoping someone has seen this error and knows the fix.Or perhaps I am missing some other template/module/extension that needs to be installed.

Thanks,

Chap

Kghbln (talkcontribs)

I assume that there is something wrong with the "Coord" template you created on you wiki.

Chapjo (talkcontribs)

Thank you,

I have reverted to version 3.8.2 where the parsing error does not occur. I should have tried that to begin with. Installing 4.x.x seems to cause the error.

Thanks,

Chap

Kghbln (talkcontribs)

What is the content of the "Coord" template? Is it a public wiki you could point to.

Chapjo (talkcontribs)
Kghbln (talkcontribs)

Ah ok, one of these wikipedia template monsters. Note that Wikipedia does not use the Maps extension so there is probably something it the lua module the template uses that does not play. So something will have to be adapted.

Probably it will be good to get a stack trance for the error. Perhaps there is something that the Maps extension can do to fail more user friendly.

Chapjo (talkcontribs)

Thank you Kghbln,

Having turned on all the debug tools, I found only one message that appeared to sorta-kinda look suspicious;

[GlobalTitleFail] MessageCache::parse called by ParserHook->validateAndRender/ParserHook->renderFatalError/Message->parse/Message->toString/Message->parseText/MessageCache->parse with no title set.

However, and for what it's worth, the actual language of the error message is found on line 83 @

extensions/Geo/src/Parsers/GeoCoordinateParser.php

which is part of the data-values/geo package. I'm not sure, but I think that it is installed during the Maps composer installation. In the meantime, I have added "data-values/geo": "1.1.8" into composer.json. No difference was made with 1.1.8 installed with Maps 4.0.5. The parsing errors still occurs.

Thanks again,

Chap

Kghbln (talkcontribs)

Indeed, "data-values/geo" is fetched as a dependency of "Maps". Adding it manually to your "composer.local.json" file will not change this. I am not sure where best to report. Since Maps 3.x is working I would report initially at this spot to make the developer aware. That spot will be the second approach.

Chapjo (talkcontribs)

Thanks K.

Will follow your advice.

Chap

Brunodapei (talkcontribs)

i have the same problem. did you found how to fix? thank you

Reply to "Maps extension leaves parsing error with {{coord}}"
Squeak24 (talkcontribs)

Hi, I am trying to get Maps working on a Wiki I have installed on an A2 Hosting reseller account.

Obviously I don't have access to composer on this, so I downloaded maps using composer onto a local server and uploaded it to my server as I have done many times at work from an internet facing machine to my production server which isn't internet facing.

I am a little unsure what I am doing wrong.

Any help is appreciated.

157.131.135.60 (talkcontribs)

You should be able to use SSH and install composer from command line. Look for SSH in your site's cPanel dashboard.

Reply to "500 Error when installing maps"

Few Questions: Full Screen Button, Close tooltips upon another opening, moving the 'Filter Markers' input.

1
157.131.135.60 (talkcontribs)

Hello all,

I'm hoping to get some help here as I'm failing. Any help I can get is appreciated.

I'm using Semantic Maps with the Google API on my Foreground skin.

  1. I want to add a 'Full Screen' button in the corner like a lot of maps have. Any clues on how to add that? Someone posted a thread below saying they had done it but offered no instructions.
  2. When you select a pin it opens the information tooltip. However when you select another, the previous ones remain open. I'm creating a densely populated map which gets messy really fast when opening multiple locations. Is there any way to have only one tooltip open at a time?
  3. On mobile the 'Filter Markers' input box is hidden behind the 'Map/Satellite' toggle buttons. I've had a heck of a time trying to move the Filter Markers input to no avail.

I'm pullin my hair out here! Thank you in advance!

Reply to "Few Questions: Full Screen Button, Close tooltips upon another opening, moving the 'Filter Markers' input."

How to integrate a legend to the map?

1
Justadust (talkcontribs)
Reply to "How to integrate a legend to the map?"
Heinrich krebs (talkcontribs)

Hi, I want users to use the Mapeditor to create shapes and stuff on the map, then store them in a property.

To show the map, I want to use {{#show: with format=template so that I get all the lines back in a way that the {{#display_map: Parser understands, but it doesn't seem to work - generating the syntax-error [[smw::off].

How come ?

Jeroen De Dauw (talkcontribs)

Can you paste the template?

Heinrich krebs (talkcontribs)

Here you mean. Sure (got the wiki working after again an update error)... So.

This is the "upper" template, doing the semantic search of either "Artikel" or the current page and gives all matching properties to "KarteZurSeite-Zeile". As was suggested, I tried to get rid of the [[SMW::on]] code by using #replace:.

<includeonly>{{#display_map:
{{#replace:{{#replace:{{#show:{{{Artikel|{{PAGENAME}}}}}|?KartenInfo|mainlabel=-|link=none|headers=hide|format=template|template=KarteZurSeite-Zeile}}|[[SMW::off]]|}}|[[SMW::on]]|}}
}}</includeonly><noinclude>[[category:System]]Diese Vorlage soll alle Attribute des Names „[[:Attribut:KartenInfo|KartenInfo]]” auf einer Karte anzeigen.</noinclude>

This is the "lower" Template. Basically adding a | (Pipe) before the property and return it.

<noinclude>[[category:System]] Diese Hilfs-Vorlage ist für „[[Vorlage:KarteZurSeite]]”.</noinclude>|{{{1}}}
Revansx (talkcontribs)

did you ever get a solution for this? -Rich (@Revansx)

Reply to "smw::off ?"