Topic on Extension talk:Maps

Image Overlay not aligned with geoJSON

5
104.247.242.51 (talkcontribs)

Hello! I am trying to get an image overlay to align with my geoJSON in leaflet, as in the New York subway example in the documentation. However, the image is always centred on (0,0), rather than where my geoJSON data is.


{{#display_map:|image layers=myimage.png|geojson=mygeojson|height=600|width=900|zoom=3.75}}

104.247.242.51 (talkcontribs)

Edit: The image actually isn't centred on (0,0). I'm not sure how it is aligned, but it's not with the bounds of the geojson

104.247.242.51 (talkcontribs)

Ah! It's always aligning the bottom-left corner of the image to (0,0).

104.222.119.168 (talkcontribs)

I've tried to work around this by putting the bottom left corner of my geoJSON at (0,0), however the problem remains that the image layer is constrained to a set width, which cannot be modified inside the display_map code.

Jeroen De Dauw (talkcontribs)

What you are trying to do is indeed not possible without changes to Maps. Pull Requests and/or funding welcome.

Reply to "Image Overlay not aligned with geoJSON"