MapEngine

Internal tool for mapping and styling geospatial records

Settings

Clustering


Clustering is used to group nearby markers together.

Option Description
Enable Clustering Toggles clustering on or off
Min Zoom Minimum zoom level at which clusters are generated
Max Zoom Maximum zoom level at which clusters are generated
Radius Cluster radius (in pixels)
Extent Tile extent - radius is calculated relative to this value

image.png


Project


image.png

Exporting

Clicking the Export button will save your sources and layers to a file and download it to your device.

Importing

Clicking the Choose file button will prompt you to upload a MapEngine export file. The application will remove any existing data and rebuild the sources and layers (including their visibility, style, target filter, and relationships) contained in the export file.


Sources

Records


image.png

Record source files are a JSON formatted array of objects with each object containing at minimum a lat and lng key. Each record is attached to a marker which is placed on the map according to the latitude (lat) and longitude (lng) keys. Any other arbitrary properties and values can be included in each record.


[
  {
    "First Name":"John",
    "Last Name":"Smith",
	...
    "lat":"47.204935",
    "lng":"-122.237967"
  },
  {
    "First Name":"Jane",
	"Last Name":"Doe",
    ...
    "lat":"47.204157",
	"lng":"-122.231124"
  }
]


Skyward typically exports data in CSV format, however there are many free online tools which can convert CSV files to JSON. The Technology Services department can perform bulk geocoding of addresses if needed.

CSV JSON
First Name,Last Name,lat,lng
John,Smith,47.204935,-122.237967
Jane,Doe,47.204157,-122.231124
[
  {
    "First Name":"John",
    "Last Name":"Smith",
    "lat":"47.204935",
    "lng":"-122.237967"
  },
  {
    "First Name":"Jane",
	"Last Name":"Doe",
    "lat":"47.204157",
	"lng":"-122.231124"
  }
]



GeoJSON


image.png A GeoJSON source is a file which defines geospatial features (e.g school boundaries) in the GeoJSON format. A repository of optimized SBLSD boundary files can be downloaded from github.com/sblsd/gis.


Layers

Layers provide a way to style and organize the markers associated with source records. Markers can be targeted using attributes and values defined in the records.


Creating a Layer


To create a layer, click the New Layer button

image.png


Editing a Layer


Title

The layer title can be any arbitrary string of text and is only used in the UI

Target

The layer target is a JavaScript expression which should evaluate to either true or false. Upon saving a layer, the target is evaluated against every source record in order to associate records with the layer.

The constant record is exposed to the target expression and can be used to filter records based on source data. For example, lets say this is what our source records look like (represented as a table to save space):

School Grade Id
THE 1 1
THE 1 2
DEE 2 3
DEE 3 4
THE 3 5
DEE 5 6
// Matches records where Grade is equal to 1. (2 records)
record['Grade'] == '1'

// Matches records where School is equal to THE. (3 records)
record['School'] == 'THE'

// Matches records where Grade is equal to 1, 2, or 3. (5 records)
['1','2','3'].includes(record['Grade'])

// Matches records where School is equal to LRE. (0 records)
record['School'] == 'LRE'


Children

Layers can nested by dragging and dropping them in to the parent layer's children container.

mapengine-layer-child.gif

Child layers:

  • Inherit their parent's style settings
  • Inherit their parent's visibility
  • Evaluate their target filter only against records that are also matched by their parent
  • Are deleted when their parent is deleted