-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
Description
Hi @tombatossals,
Using static image map, I managed to add marker at the point clicked on the map. However, the existing label message of the existing markers will teleport to the top left of the map.
Looking at the webpage source code, the "popup-label marker ng-binding" of the existing markers are outside of the "ol-viewport", only the "popup-label marker ng-binding" of the newly added marker is inside the "ol-viewport".
Code snippet (html):
<openlayers ol-center="center" ol-markers="markers" height="400px" width="100%">
<ol-layer ol-layer-properties="staticlayer"></ol-layer>
<ol-marker ng-repeat="marker in markers" ol-marker-properties="marker"></ol-marker>
</openlayers>
Code snippet (js):
$scope.$on('openlayers.map.singleclick', function(event, coordinate) {
$scope.$apply(function() {
$scope.markers.push({
coord: coordinate.coord,
projection: 'pixel',
label: {
message: "asd",
show: true
}
});
});
});