Skip navigation

Overlay types

It is important to determine what type of data format(s) you are going to work with before creating a map. The NPMap Builder (aka "Builder") supports eight layer types:

Each type has its own strengths and weaknesses. The following table outlines the capabilities of each of the layer types.

Layer Type Click Hover Clustering Styling Querying
ArcGIS Server X
CartoDB X X X X
CSV X X X X
GeoJSON X X X X
KML X X X X
Mapbox X X
SPOT X X X X
Tiled

ArcGIS Server

ArcGIS Server is a server-side solution for publishing geospatial data via web services. Its primary strength is its integration with ArcGIS Desktop -- the go-to desktop solution for many GIS professionals.

A landing page for one of the National Park Service's ArcGIS Server services.

ArcGIS Server supports publishing data in two different ways: map services and feature services.

Map Services

ArcGIS Server map services serve raster tiles that can be consumed by web maps and other clients. The raster tiles can either be pre-generated ("tiled") or generated on-the-fly ("dynamic").

To add an ArcGIS Server map service to Builder, enter the URL of the service and choose which of the service's sublayer you want to use in the dropdown. Note that the URL must end with "MapServer".

Adding an ArcGIS Server map service to your map.

Feature Services

ArcGIS Server feature services "allow you to serve features over the Intenet..." (http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000002w8000000). Feature services do not serve raster tiles. They, rather, serve raw vector data in a variety of formats.

Feature services can be added via Builder by using the "GeoJSON" layer type. If a feature service is hosted on ArcGIS Online, you can simply specify the "?f=geojson" parameter in the layer URL. ArcGIS Server does not yet support GeoJSON, however, so you'll have to pass the feature service through a proxy.

ArcGIS Online

var NPMap = {
  div: 'map',
  overlays: [{
    type: 'geojson',
    url: 'http://services1.arcgis.com/fBc8EJBxQRMcHlei/ArcGIS/rest/services/GRSM_RESTROOMS/FeatureServer/0/query?f=geojson&outSR=4326&where=OBJECTID+IS+NOT+NULL'
  }]
};

ArcGIS Server

var NPMap = {
  div: 'map',
  overlays: [{
    type: 'geojson',
    url: 'https://server-utils.herokuapp.com/arcgis2geojson/?url=http://mapservices.nps.gov/arcgis/rest/services/LandResourcesDivisionTractAndBoundaryService/MapServer/3'
  }]
};

CartoDB

A CartoDB table.

CartoDB is a hosted solution for publishing and serving both geospatial and tabular datasets. It differs from other providers in that it gives you the flexibility to use full SQL queries against your datasets.

To add a CartoDB layer, you must enter the "User Name" and "Table Name" for your CartoDB account and table. You can also (optionally) enter a SQL query string to filter data for your map.

Adding a CartoDB table to your map.

The National Park Service has a license agreement with CartoDB. If you would like to use CartoDB in a project, send an email to npmap@nps.gov and we'll get you setup with an account.

CSV

Information represented in comma-separated value (CSV) files is separated by commas. These files can be created by most desktop and web-based spreadsheet tools, including Microsoft Excel and Google Sheets. After creating a CSV file, you can get a URL for it by uploading it to either the NPS.gov content management system or GitHub.

It is important to note that the first row in your CSV file must contain your file's field names. Your CSV file also must contain "lat" and "lng" columns to work properly in Builder.

If you are having issues with CSV formatting you may want to convert it to GeoJSON by dragging and dropping your CSV file onto the http://geojson.io web page.

You can download a sample CSV file from the National Park Service's GitHub data repository.

GeoJSON

GeoJSON is "a format for encoding a variety of geographic data structures." It is an open standard that is designed for storing simple geographic features. It supports "Point", "LineString", and "Polygon" geometry primitives.

A snippet of GeoJSON.

There are many tools that can help you with GeoJSON creation and syntax. The geojson.io website is a multi-functional tool for both creating GeoJSON data from scratch and converting existing data (KML, GPX, CSV, and TopoJSON) into GeoJSON format. Check out the help section on geojson.io to learn how to use the tool.

The geojson.io help section.

GeoJSON Lint is a tool that can be used to validate and test the syntax of your GeoJSON. If you are unfamiliar with programming vocabulary, a "lint" is a code analysis program that flags suspicious code or improper syntax.

A screenshot of the GeoJSON Lint tool.

KML

KML is a format created by Google that was first supported by the Google Earth application. It is now considered an open specification.

Note that Builder does not support KMZ files. To convert from KMZ to KML, simply unzip the file.

If you are having problems loading a KML file into Builder, an alternative approach is to convert it to GeoJSON using http://geojson.io.

Adding a KML layer to your map.

Mapbox

Mapbox tiles can be created in one of two ways:

  1. By using the Mapbox editor to create a custom basemap.
  2. By using TileMill or Mapbox Studio to create custom tilesets with your own source data.

Whichever approach you use, you will need to use the map id that Mapbox gives you once your layer is available on their website to add your layer to Builder.

Adding a Mapbox layer to your map.

The NPMap team maintains a license agreement with Mapbox for the National Park Service, so feel free to contact us if you are interested in hosting your data on Mapbox.

SPOT

Many National Parks deploy SPOT satellite devices with park personnel (backcountry rangers, dog sled teams, snow plow operators, etc.) for safety reasons. If public access is enabled for a SPOT device, you can use the id of the device to add a real-time tracking layer to Builder.

Tiled

Tiled layers read in a templated URL to add a basic tileset to your map. There are many such tilesets out there, including tilesets from Stamen, Mapquest, OSM, and governmental organizations.

The URL template can contain {s} (subdomain), {z} (zoom level), {x} (x tile coordinate), and {y} (y tile coordinate). X, Y, and Z are required. An example for OpenStreetMap: http://{s}.tile.osm.org/{z}/{x}/{y}.png.

Adding a tiled layer to your map.