10 years ago
3
Topic
Hello,

I'm using the Map Template in an Module to show the Map in the Article Content. Is there a possibility to change the default Latitude and Longitude to the calculated position (Address to Coordinates)?
Please excuse my bad english. Thank you for your help!

Get a VIP membership
10 years ago
0
Level 1
Hello Skill,
in the SEBLOD template Map, the default Latitude & Longitude are for centering the map and for the time, those fields are not dynamic.

Best regards.
Lionel
10 years ago
0
Level 1
Hello,

I just bought the map template and it is working fine so far.

Only I need to center the map dynamically because I'm using it to display single markers in a content view. The map is placed there as a module.
Now my different locations are pretty far from each other but I need to set default zoom to 12. Markers are placed correctly, but are outside of the visible area.

I know that via the Google Maps API it's not a big deal to center the map to include all markers by using bounds and map.fitBounds(bounds).

We often have that use case and the map template as it is now is not flexible enough to cater for that scenario.

I kindly request the SEBLOD dev team to consider building in an extra feature where we can choose whether to center the map automatically or use the default center lat and lng or use the lat and lng of the marker as center.

Thank you.
10 years ago
0
Level 1
@zwergo
thanks for the tip. I know that plugin, it is very good, indeed. But since I'm working with SEBLOD, I bought the map template. I could have used the Reumer plugin but then that's one more extension to install and maintain.

As I need to show the map with only one icon and with multiple icons also, I adjusted the code so that the map will center to the marker position when there is only one marker. When there are multiple markers, it will auto extend the bounds of the map so that all markers are visible, auto center and adjust the zoom.

After reading up on the Google Maps API and looking at the index.php of the map template it was quite easy to make these modifications even not being a programmer per se.

Cheers
gerhard
Get a VIP membership