Tutorial

Tutorial - Zoom API

Mapapps

Read more detailed information in the referenced API documentation:

Zoom API reference

Read more detailed information in the referenced API documentation:

Zoom API reference
To use the function as seen in the example, use following code:

    function postEvent(functionName, detail) {
        const integrationElement = document.getElementById('mapIntegrationElement').contentWindow
        if(integrationElement){
            integrationElement.postMessage({functionName: functionName, detail: detail}, "*")
        }
    }
    [...]
    const parameter = {
            geometry: {
                type: "point",
                x: x,
                y: y,
                spatialReference: {
                    wkid: wkid
                }
            },
            scale: scale
    }
    postEvent("zoomTo",parameter )
        
An example with extent:

    const parameter = {
            geometry: {
                type: "extent",
                xmin: xMin,
                xmax: xMax,
                ymin: yMin,
                ymax: yMax,
                spatialReference: {
                    wkid: wkid
                }
            }
        }
        postEvent("zoomTo",parameter )