i have seen the OnClickListener on the Map of gwt-ol3 .
In javascript of Ol3.js there is a method in the map class as
map.once(type,listener)
now i want to write a listener on the map that whenever the map is rendered this newly written listener should run, i dont want do any Clickoperations ,,, for example i want to get the pixel values of a point (Polygon) , i want to write a listener that sends the pixel values to OLMapConncetor of v-ol3
the javascript code of ol3.js as
map.once('postrender', function() {
var geometry = polyFeature.getGeometry();
var coordinate = geometry.getCoordinates();
var pixel1 = map.getPixelFromCoordinate(coordinate);
var element = document.getElementById("log");
element.innerText = pixel1;
});
can u add as a feature or give me any methods to design.
i have seen the OnClickListener on the Map of gwt-ol3 . In javascript of Ol3.js there is a method in the map class as
map.once(type,listener)
now i want to write a listener on the map that whenever the map is rendered this newly written listener should run, i dont want do any Clickoperations ,,, for example i want to get the pixel values of a point (Polygon) , i want to write a listener that sends the pixel values to OLMapConncetor of v-ol3 the javascript code of ol3.js ascan u add as a feature or give me any methods to design.