Maps icon indicating copy to clipboard operation
Maps copied to clipboard

copycoords works not with leaflet

Open carchaias opened this issue 3 years ago • 3 comments

Setup

  • Maps version:9.0.6
  • MW version:1.35.5
  • PHP version: 7.4.27
  • SMW version (if applicable): 3.2.3

Issue

The parameter copycoords=yes does not work with format=leaflet. Instead of popup the dialog for copycoords the browser context dialog opens. This works fine with googlemaps.

carchaias avatar Mar 18 '22 12:03 carchaias

In case of leaflet it only works if you click a marker. Not any place on the map. Do you have a use case for getting coordinates from arbitrary positions?

You can see it working at https://maps.extension.wiki/wiki/Leaflet_Maps_examples#Copy_coords

JeroenDeDauw avatar Mar 18 '22 12:03 JeroenDeDauw

Ok, rightclicking on a marker works on my wiki too (have not seen this before). That issue came up as we used openlayers on the wiki some longer time ago and a user now with leaflet complained that copying of coords is no longer available. It was somehow handy to simple copy coords from whereever you want.

carchaias avatar Mar 18 '22 13:03 carchaias

In case of leaflet it only works if you click a marker. Not any place on the map. Do you have a use case for getting coordinates from arbitrary positions?

Yes, most definitely: we want users to select a position on the map of where they are located. That's for the MCH2022 event, where villages can choose their preferred location on the map.

Like this: image

This can be done with: https://www.mediawiki.org/wiki/Extension:Page_Forms/Input_types

Choosing the leaflet type. THnx!

stitch avatar Jun 01 '22 08:06 stitch