Score:0

Help for center Geolocation Polygon Map with Leaflet?

cn flag

Is somebody knows how to center a leaflet map with a geolocation polygon field? I want to center the drawing of polygon like below but there is just few options which don't help me.

enter image description here

To reproduce :

  1. Install Geolocation Project and All Demo
  2. In admin/structure/types/manage/geolocation_geometry_demo/display , change the format of Geolocation Geometry Polygon in "Geolocation Geometry Formatter - Map" and Save.
  3. Edit the content "Static Geolocation Geometry Demo - Wanaka NZ" and change the first Geolocation Geometry Polygon with this value : POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) and Save.
  4. Now go to the content view and see that the map is not centered on Polygon but in the sea.

I try to change differents options in the display but nothing works.

Maybe it's possible to update the position of the map with hook_geolocation_field_map_widget_alter??

Thanks for your help.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.