How to automatically center the map with the kml

  • moreno995
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #13486 by moreno995
Hi,
I uploaded a map by embedding a kml file.
Is it possible to center the view with the coordinates and zoom of the kml file?
Google allows these options with the preserveViewport comand but I need to use openstreetmap.

Thanks,
Moreno

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #13487 by Dima
Hi Moreno
Just create path, enter your information on File Layer tab, and set Layer Show Type to Zoom.
In this case this will automatically set center and zoom to show it all.

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

  • moreno995
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #13488 by moreno995
Replied by moreno995 on topic How to automatically center the map with the kml
Hi Dima,
thanks for the reply.
I have 300 maps with 300 kml to generate on my site.
I have set an automatic method to override the component with the kml in based on the page where I am.
I have correctly generate the map with the kml but the center and the zoom are the same for everyone. I would need the map to center itself automatically based on the kml (google function: preserveViewport).
It's possible?

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago - 3 years 11 months ago #13490 by Dima
As I mentioned. Just create path for each KML and set Layer Show Type to Zoom
You don't need create map for each Path.

Don't forget support my developments: post review in JED , donate , help with translation ;)
Last edit: 3 years 11 months ago by Dima.

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #13492 by Dima
But if you display more than one Path in map automatic Zoom and center it is not available now. It will be in future - change map bounds to show all map objects automatically.

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.142 seconds

Donate


Go to top