map.apps Bundle APIs 4.20.0
    Preparing search index...

    Interface IntegrationExtension

    Extension of IntegrationAPI.

    interface IntegrationExtension {
        clearHighlight(): Promise<void>;
        highlight(geomOrGraphic: any): Promise<void>;
        whenMapReady(callback: () => any): Promise<void>;
        zoomTo(geom: any, options?: ZoomOptions): Promise<void>;
    }
    Index

    Methods

    • Remove currently highlighted item from the map.

      Returns Promise<void>

    • Highlight a geometry on the map. The previous highlight will be removed.

      The given geometry can be extended by a symbol and a popupTemplate property.

      Parameters

      • geomOrGraphic: any

        An geometry or graphic described as JSON. See samples.

      Returns Promise<void>

      api.highlight({
      x: 7,
      y: 52
      });
      api.highlight({
      geometry: {
      x: 7,
      y: 52
      },
      symbol: {
      type: "simple-marker",
      color: [0, 255, 255, 0.25],
      size: 16,
      outline: {
      color: [0, 255, 255, 1],
      width: 2
      }
      }
      });
      api.highlight({
      geometry: {
      x: 7,
      y: 52
      },
      popupTemplate: {
      title: "My City"
      }
      });
    • Wait until the map is ready. Please use this method before calling methods like zoomTo or highlight.

      Parameters

      • callback: () => any

        function to be informed when map is ready for change

      Returns Promise<void>

      api.whenMapReady(function () {
      api.zoomTo(geom);
      });
    • Zoom to given geometry.

      Parameters

      • geom: any

        an geometry expressed as JSON described here.

      • Optionaloptions: ZoomOptions

        Options used to zoom

      Returns Promise<void>

      api.zoomTo(
      {
      x: 7,
      y: 52
      },
      {
      scale: 5000
      }
      );