angular-mapbox icon indicating copy to clipboard operation
angular-mapbox copied to clipboard

Single markers not appearing

Open vrouet opened this issue 9 years ago • 0 comments

While integrating a map on a page we discovered that markers don't work without a ng-repeat attribute. For instance, this will not display any marker:

<mapbox map-id="{{mapTemplate}}" scale-to-fit height="400" width="100%">
    <marker ng-repeat="page in pages" lat="{{place.latitude}}" lng="{{place.longitude}}"></marker>
</mapbox>

The only work-around I found is doing it like so:

<mapbox map-id="{{mapTemplate}}" scale-to-fit height="400" width="100%">
    <marker ng-repeat="onePlace in [place]" lat="{{onePlace.latitude}}" lng="{{onePlace.longitude}}"></marker>
</mapbox>

Although it does work, it's only a work-around, and not a clean way of doing it. Maybe someone who knows the codebase better than I do can understand what's causing the bug.

vrouet avatar Sep 18 '15 14:09 vrouet