Shared Samples

WebGIS enables powerful geospatial web applications and services that securely share your organization’s rich geospatial data, and provides tools to deeply examine spatial data and create value added products, on demand. Please note a HGDN subscription is required to download code samples
Showing results for 
Search instead for 
Do you mean 

Examples: Viewfinder Consumer Portal

by Technical Evangelist on ‎09-09-2015 04:09 AM - edited on ‎09-10-2015 04:08 AM by (1,085 Views)


Viewfinder on Leaflet map adapter in the Consumer Portal. This extension creates a button in the toolbar, which activates "viewfinder" mode when clicked. When the map is clicked in the "viewfinder" mode, the "viewfinder" mode is disactivated. A viewfinder mode displays map with a hole in the topmost layer (technically it's a little different, see the implementation Smiley Tongue), so it is possible to see what is in the layer underneath.



Browser compatibility

  • Chrome 35+
  • Firefox

It will NOT WORK ON Internet Explorer due to lack of CSS clip-path support.


Private API

This extension uses private API and leaflet API.



Add the script with the following source code to your page.


Source code