Extension talk:Maps

Jump to navigation Jump to search

About this board

Post questions, bug reports and feature requests at https://github.com/JeroenDeDauw/Maps/issues.

The maintainer of the Maps extension does not check this page frequently!


The documentation for the Maps extension is located at https://www.semantic-mediawiki.org/wiki/Extension:Maps



Archive

Prb11199 (talkcontribs)

Hi,


I want to plot a number of lines on a single map, based on a query.

Each of these lines represents a power-line; each power line can be stored on a wikipage, with two or more coordinates.


Is there a way to do this?


Thanks in advance

Jeroen De Dauw (talkcontribs)
Squeak24 (talkcontribs)

Hi, I am looking at using this Maps extension to display businesses in the vicinity of the user.

With the maps extension can you search for businesses that are near you and detail how far they are away?

Squeak24 (talkcontribs)

I should have gone to the bottom part of the page. I will have to have a play over the weekend

Extension:Whats Nearby

How to integrate a legend to the map?

2
Justadust (talkcontribs)
Jeroen De Dauw (talkcontribs)
Reply to "How to integrate a legend to the map?"

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

2
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!

Jeroen De Dauw (talkcontribs)

If you use Leaflet (the default service in recent versions of Maps) then you can set fullscreen=on.

Reply to "Few Questions: Full Screen Button, Close tooltips upon another opening, moving the 'Filter Markers' input."
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.

Jeroen De Dauw (talkcontribs)

Indeed, clustering is not supported for data added via GeoJson.

Reply to "Cluster zoom not working"

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.

194.96.92.160 (talkcontribs)

Any documentation available how to install additional Leaflet plugins?

Jeroen De Dauw (talkcontribs)
Reply to "Leaflet Plugins ?"
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?

195.83.12.100 (talkcontribs)

I am in the same pattern, it is with leaflet layer.

Jeroen De Dauw (talkcontribs)
Reply to "Map never loads first time"
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)

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}}"