I wanted to know if there is any way to set an HTML ID for an icon in OpenLayers. For example, If I set an icon with HTML ID "icon1"
, I want to be able to access it using document.getElementById("icon1");
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI wanted to know if there is any way to set an HTML ID for an icon in OpenLayers. For example, If I set an icon with HTML ID "icon1"
, I want to be able to access it using document.getElementById("icon1");
id
for that icon (marker).