I am trying to set a custom marker on a Google AngularJS map:
<google-map draggable="true" style="display:block; width: 100%; height:100%;"> <markers> <marker ng-repeat="marker in markers" coords="marker" icon="../img/marker-map.png"> </marker> </markers> </google-map>
This code causes the following error:
Error: [$parse:syntax] Syntax Error: Token '.' not a primary expression at column 1 of the expression [../img/marker-map.png] starting at [../img/marker-map.png].
In the Angular Google Maps API documentation, the Marker icon directive parameter says:
An expression that returns the absolute path to the image used as a marker icon
I think I misunderstood this expression. Can't set the relative path for the marker icon image, as in the above code example? What could be an expression to reference a marker image?
source share