javascript - Detect if overlay is in view -


how can detect if overlay element visible / not visible?

i think there possibility information on bounding boxes of dom-elements, doesn't seem solution me.

is there way find out using openlayers api?

you can check if ol.overlay position inside ol.view extent with:

var overlay_position = overlay.getposition(); var view_extent = map.getview().calculateextent(map.getsize()); console.info(ol.extent.containscoordinate(view_extent, overlay_position)); 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -