Posted: 10 Jun 2020 9:21 EDT Last activity: 18 Nov 2020 22:43 EST
Google Maps control setting the default settings
We are using the maps control to display the partner location on the map. For this we have used the pyTrackingMap control. When using the pyTrackingMap it is possible to define the zoom, however the initial latitude and longitude for the control needs to be hard-coded instead of referencing to a property value.
When trying to use the pxAddressMap control, we are able to achieve refer to the initial coordinates using property reference, however, the default/initial zoom cannot be modified.
1. Is there a control where the default zoom can be defined as 20 whereas the initial location is defined from property values?
2. Is there a possibility to have both the initial zoom and initial location using property references?
Appreciate your help.
***Edited by Moderator Kayla to update Content Type from Discussion to Question***
If I understand correct, Address Map control will automatically adjust zoom level based on pins in the map. It will be adjusted in a way to show all the pins and current location (if Show user location option is selected). So would like to know why we have to set specifically to some particular zoom level.
The requirement is show only 1 address as a default location when the section is rendered on the frontend and the zoom must be 20. For this we tried the folowing 2 approaches
pyTrackingMap control: When using the pyTrackingMap it is possible to define the zoom level as 20 but the initial latitude and longitude for the control when used in the section must be hard-coded and does not allow to reference values from clipboard property
pxAddressMap control: When using pxAddressMap, it is possible to reference properties (instead of hard-coding) for the initial coordinates when configuring the section, however, the default zoom is not 20 and cannot be modified.
Hence, the question:
Is there a control where the default zoom can be defined as 20 whereas the initial location is defined from property values?
Is there a possibility to have both the initial zoom and initial location using property references?
When only displaying one marker, use pxAddressMap control instead of the MAP control that points to pyTrackingMap. While you cannot specify the scale, pxAddressMap seems to default to scale 10 for a single marker, which is a much better view than pyTrackingMap shows.