Here's a directive I'm working with:
<g-map-locations center={{myLocation}} zoom="4" id="map" class="map"></g-map-locations>
The zoom parameter is used in Angular to set the zoom level for a Google Map:
attrs.zoom = zoom
setMapOptions: function(center, zoom){
var mapOptions = {
zoom: zoom,
center: center
}
return mapOptions;
},
I'm running into an issue where Google Maps is throwing a setZoom: is not a number
error, even though it seems to be functioning correctly.
zoom = 4
Is there a way for me to instruct Angular to pass the value as a number or somehow convert it within the directive?