• Hello,

    from some web research I found several problems regarding leafletJS and images but I will state my question anyway:
    I’m using leaflet map successfully with a real map but want to do this also with a historical map (image). That image ist shown correctly and I also can show a marker in center position when I use draggable as attribute. But I found no way to set a marker at a certain position. I tried with x and y, also lat lon etc.
    My page for this: https://heimatschilder.de/bildkarte_testwiese/

    My shortcode:
    [leaflet-image src=”https://heimatschilder.de/wp-content/uploads/2021/02/ur-oeder_klein-scaled.jpg”%5D
    [leaflet-marker draggable]

    Leaflet map is a very powerful and cool tool for me, it would be even more powerful when I could work with images too …

    Best regards and thanks in advance,
    Markus

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor hupe13

    (@hupe13)

    Use

    [leaflet-image src="..." zoom=1 zoomcontrol=1 height="..."]
    [leaflet-marker draggable]

    and open the Webconsole (Strg+Umschalt+K in Firefox). Then drag the marker and look in the Webconsole. There are the logs for x and y. Then you can use the appropriate values.

    [leaflet-image src="..." zoom=1 zoomcontrol=1 height="..."]
    [leaflet-marker draggable  y=yyy x=xxx]

    .

    Thread Starter margon0815

    (@margon0815)

    Hi hupe13,

    and thank you very much – now it works!!! I did’nt know the konsole window and the resulting x and y are far too small in my case as I expected and tested blind. Now I’m able to get the image coordinates I need.

    Thanks again,
    Markus

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘image as a map’ is closed to new replies.