Skip to content

How to Add the PostRender as a new Listener on Map #102

@ramanamuttana

Description

@ramanamuttana

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions