Setting the position on a map

More
7 months 1 week ago - 7 months 1 week ago #154717 by jonsen
jonsen created the topic: Setting the position on a map
Hey everyone!

I am trying to set the position on a map via Javascript/jQuery in LimeSurvey 2.65. I tried setting the transform attribute - but that only works in a controlled environment because it is based on pixels.

How can I change the coordinates directly? I also tried using a Leaflet command, but map.setView(new L.LatLng(40.737, 50.923), 3); doesn't work either - although it does on the Leaflet example page.

Can someone help me? (The default position is not enough because I want to animate different map positions.)

Best
Jones
Last Edit: 7 months 1 week ago by jonsen.

Please Log in to join the conversation.

More
7 months 1 week ago #154740 by LouisGac
LouisGac replied the topic: Setting the position on a map
Hi, the map question is using google map or openLayers:
openlayers.org/

Btw, I agree we should provide a leaflet version....

Please Log in to join the conversation.

More
7 months 5 days ago #154884 by jonsen
jonsen replied the topic: Setting the position on a map
Now I'm confused... It does say "Leaflet" at the bottom of the map?!

So what I'm trying to: Make it look like it's randomly jumping around the map until stopping at a "random" location (which in fact has been set by the default location setting beforehand).

Does anyone know how to do this?

Thanks!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!