Openlayers 3.10.1 bind Overlay to moving feature

المشرف العام

Administrator
طاقم الإدارة
In my map I'm tracking vehicle locations. If a vehicles is clicked a Overlay with additional informations is shown. How can I "bind" the Overlay to the vehicle location. I tried

feature.getGeometry().on( 'propertychange', function(propEvt) { console.log('I'm here'); var extent = feature.getGeometry().getExtent(); var centerOfFeature = getCenterOfExtent(extent); popup.setPosition(centerOfFeature); }, feature.getGeometry());But log message is not shown but the feature is still moving.

-- Rüdiger



أكثر...
 
أعلى