Visualization Geo-Spatial Data with the MapperΒΆ

Use the Mapper to visualize geo-spatial data using Google maps (you must be connected to the Internet). Query the database using the Finder or the Aggregation Builder and if the data is geo-spatial, use the marker/pin icon shown below to open the Mapper.


The Mapper will open in a new window/tab and will show the documents in the result set on a map. The number of documents shown are the number shown in the result set (i.e. not the entire result set but the documents shown in the viewer). If you issue a new query you can re-plot the results on the map using the reload button at the top left.

For a document to be displayed on a map it must have a set of coordinates. JSON Studio supports a large variety of coordinate structures as shown below:

  • Coordinate array (longitude then latitude) - Point:

    "loc": [ -87.7157, 41.849015 ]
  • x/y - Point:

    "x": -87.7157, "y": 41.849015
  • x/y as sub-document - Point:

    "loc": {
     "x": -73.958805,
     "y": 40.768476
  • long/lat - Point:

    "long": -118.258189, "lat": 34.007856
  • long/lat as sub-document - Point:

    "location": {
     "long": -118.081767,
     "lat": 33.90564
  • GeoJSON Point:

     "type": "Point",
     "coordinates": [-70.9013669192791, 41.863015673735454]
  • GeoJSON LineString:

     "type": "LineString",
     "coordinates": [ [ -118.420692, 34.258081 ], [ -75.228819, 39.944815 ], [ -83.374908, 42.318882 ] ]
  • GeoJSON Polygon:

     "type": "Polygon",
     "coordinates": [
       [ [ -97.461236,25.922103 ], [ -98.342647, 26.24153 ], [ -98.525967, 29.422855 ], [
       -97.461236, 25.922103 ] ]

Note that even location data that does not have a 2d or 2dsphere index will be displayed. Also note that a document can potentially have multiple geo-spatial fields and that all geo coordinates will be displayed but when clicked on the selection list (vs. the map) the first coordinate system will be centered.

Every such document structure will be displayed on the map either as a point (with a marker), as a polyline or as a polygon as shown below. Note that only the outer ring of the polygon is drawn.


Use the map as you use any Google map. If you click on a marker, polyline or polygon the document details matching that coordinate structure are displayed on the top left of the page. Use the list on the left to select a document and zoom the map on those coordinates.

Clicking anywhere on the map will build a $geoWithin query that you can then copy/paste into the Finder, Aggregation Builder or any other application. This is the same format as constructed with the NEAR operator selection in the Finder and in the filter stage of the Aggregation Builder and works with both 2d and 2dsphere indexes. You can use any other operator by free-text editing.

Table Of Contents

Previous topic

Schema Analyzer/Sampler

Next topic

Binding Variables

Copyright © 2013-2016 jSonar, Inc
MongoDB is a registered trademark of MongoDB Inc. Excel is a trademark of Microsoft Inc. JSON Studio is a registered trademark of jSonar Inc. All trademarks and service marks are the property of their respective owners.