Jump to content

Zoom click map leaflet


AlexOlPed

Recommended Posts

Someone know how I can do so that on the Leaflet map, where the flights that are live appear to me, when I click on one of them, the map zooms, I would like it not to zoom when I click on one of the flights of the Map. Someone know how to I can do?

 

Skin: StislaSkin

phpVMS 5.5.2.72 simpilot/php7.2

 

Edited by AlexOlPed
Link to comment
Share on other sites

Look for:

  // If they selected autozoom, only do the zoom first time
        if (opts.autozoom == true && run_once == false) {
            map.fitBounds(bounds);
            run_once = true;
        }

 

Comment it out. That should stop the zoom when you click on a flight. Do not remove it, so if it doesn't work or it breaks something you can just uncomment it and it will work again.

Link to comment
Share on other sites

7 minutes ago, Strider said:

Look for:


  // If they selected autozoom, only do the zoom first time
        if (opts.autozoom == true && run_once == false) {
            map.fitBounds(bounds);
            run_once = true;
        }

 

Comment it out. That should stop the zoom when you click on a flight. Do not remove it, so if it doesn't work or it breaks something you can just uncomment it and it will work again.

I have commented on what you tell me in the acarsmap.js file but it keeps zooming when I click on a flight that is live.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...