So, I created this small map application HERE , and as you can see, it shows your current localization, now the problem is that the marker will not be displayed at the current location. If you are CTRL+U , you will see that the code for the marker is:
<openlayers ol-center="center" height="400px"> <ol-marker lat="center.lat" lon="center.lon" message="Your current location." ng-model="center" > </ol-marker> </openlayers>
lat="center.lat" and lon="center.lon" at the beginning is 0 , now if I rigidly set the lat and lon values ​​for my current location, of course, the marker will be displayed at my current location, but how to update the values ​​dynamically ?
I use angular.js , openLayers3 and openlayers- angular-directive , so for repeat my question, how can I update the marker dynamically?
angularjs
Tenali_raman
source share