Attempt at creating a classes to serialize and write a JS API map to arcgis.com.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
extras
README.md
dynamic.html
image.html
index.html
renderingrule.html
tiled-arcgis.html
tiled-web.html
topo-draw-persist.html
topo-graphics-with-attributes.html
usa-hybrid-persist.html
watercolor-draw-persist.html

README.md

cereal

Attempt at creating classes to serialize and write a JS API map to arcgis.com.

extras/map-cereal.js: toJSON method returns a JSON string with baseMap and operationalLayers properties. Currently supports the following:

  • feature layers created from a map service or feature service
  • graphics layers
  • dynamic map service layers (partial)
  • image service layers (partial)

Support for additional layer types is...coming...soon. Maybe.

extras/map-writer.js: simple class to create an item in arcgis.com from a web map JSON.

extras/feature-collection-shell.js: JSON template for creating a feature collection from a graphics layer.

See index.html for links to demos. This repo isn't set up for gh-pages since the useful demos require https.

Tested in Chrome. No IE support as it relies on CORS to do a cross-domain POST to arcgis.com.