When using maps, I encountered an issue where having only one marker with the zoom-to-include-markers="true" attribute resulted in the map being overly zoomed in. Regardless of how I adjusted the zoom attribute, the result looked like this: https://i.sstatic.net/PtEvy.png
For the initial render, I would prefer it to look more like this:
https://i.sstatic.net/HmVwX.png
Below is the code snippet:
<ng-map
ng-if="items"
zoom="5"
map-type-id="ROADMAP"
pan-control="false"
street-view-control="true"
street-view-control-options="{position: 'RIGHT_BOTTOM'}"
map-type-control="false"
zoom-control="true"
zoom-control-options="{style:'BIG', position: 'RIGHT_BOTTOM'}"
scale-control="true"
default-style="true"
zoom-to-include-markers="true"
class="map">
<marker on-click="" data-ng-repeat="item in items" position="{{[item.latitude, item.longitude]}}">
</marker>
</ng-map>
I attempted to adjust the zoom
attribute, but it had no effect on the map result.
UPDATE:
In JavaScript, changing the zoom using the setZoom() function is effective. Is there a method to calculate the appropriate zoom based on the map's values?
Thank you