Features

  • Drag-and-drop a geoJSON document or file onto the map.
  • Add one or more features to the map using the polygon or rectangle tool.
  • Select a feature to edit or move it. It will be shown in red when it is editable. You can move the vertices or add more vertices.
  • To add a hole to a polygon:
    1. Select the polygon to which you wish to add a hole (it will be shown in red)
    2. Click the "hole" checkbox
    3. Draw another polygon (or rectangle) within the polygon.
  • Delete selected or all polygons (e.g. select the objects, then either click the trashcan icon or press the Delete key).
  • Export the data as a geoJSON document.

Drawing & GeoJSON

Info

  • The "Drag & Drop GeoJSON" is an option that can be enabled on the plugin. This causes the plugin to render a drag-and-drop div over the map that responds to the user dropping a JSON fragment or a file containing JSON.
  • The "Drawing Mode" feature is enabled by choosing one or more shape types (marker, polygon, polyline, rectangle, and/or circle). If this is enabled, the plugin renders the drawing buttons at the top of the map, including controls for deleting features.
  • To export all the features on the map as a GeoJSON file, use javascript like this: var map = $("#map_testmap").reportmap("instance").map; map.data.toGeoJson(function(o){ $s("P19_GEOJSON", JSON.stringify(o)); });
  • These features, including those loaded from a GeoJSON file, are drawn using the Google Maps "Data Layer"; they are separate from any report pins rendered from the SQL query; the report pins are not drawn in the data layer so would not be exported as GeoJSON.
  • To load GeoJSON onto the map programmatically, the following Javascript API call can be used: $("#map_testmap").reportmap("loadGeoJsonString", '...your geoJON here...');