angular-openlayers-directive icon indicating copy to clipboard operation
angular-openlayers-directive copied to clipboard

Add marker on the event click of map

Open nourissam opened this issue 9 years ago • 2 comments

hello i try to add a maker when i click in the map but I have an issu :the marker is added far form where i clicked in the map there is the code i use : $scope.$on('openlayers.map.singleclick', function(event, data) { var prj = ol.proj.transform([ data.coord[0], data.coord[1] ], data.projection, 'EPSG:4326').map(function(c) { return c.toFixed(4); }) $scope.$apply(function() { $scope.markers.push({ latitude: Number(prj[1]), longitude: Number(prj[0]) }) }); });

nourissam avatar Jul 23 '16 19:07 nourissam

Maybe it's related to this: #298 @sathishatnet ?

juristr avatar Jul 23 '16 19:07 juristr

i don t think so because when i change the resolution of the screen it s work fine .the probem occur in the first load

nourissam avatar Jul 23 '16 20:07 nourissam