• JMap.Application.UI.Container.getVisiblePolygonGeometry

    Returns a polygon geometry representing the visible coordinates on the map. Works fine even if the map is pitched or rotated.

    Returns GeoJSON.Polygon

    Throws

    if map is not loaded

    Example

    // returns the polygon geometry representing the visible coordinates on the map.
    // ex :
    // {
    // "type": "Polygon",
    // "coordinates": [
    // [
    // [ -57, 35],[-39, 23 ], [-36, 36 ], [-52, 45], [-57, 35 ]
    // ]
    // ]
    // }
    JMap.Application.UI.Container.getVisiblePolygonGeometry()