This Platform allows you to customize your mapping application using JavaScript. For example, you can interact with the map object to dynamically change the active zoom setting. There are several functions to zoom a map in eVouala. You can zoom on to a geometry, to a specified extent or to a coordinate (Lat/Long).
To do so, simply select the mapping application you want to modify and click on the pencil icon. You will be redirected to the Edit application page. In it, click on the Advanced button. You can enter the JavaScript that will change the zoom in the script box. Here are three examples of scripts that can be used un eVouala to change the zoom on a map.
mg.utils zoom to method available
mg.utils.zoomMapToGeometry (
{ol.Map} : map Map
{ol.geom.Geometry} : Geometry to zoom to
{number=} : Optional buffer in pixels for the extent
{number=} : Optional zoom level
)
mg.utils.zoomMapToExtent (
{ol.Map} : map Map
{ol.Extent} : The extent where to zoom to
{number=} : Optional buffer in pixels for the extent
{number=} : Optional zoom level
)
NOTE: If the zoom level is not set, mg.MAX_ZOOM_IN is used as default.
mg.utils.zoomMapToCoordinate (
{ol.Map} : map Map
{ol.Coordinate} : The extent where to zoom to
{number=} : Optional buffer in pixels for the extent
{number=} : Optional zoom level
)
0 Comments