/cmapi2

Next generation Common Map API for cross language and platform map collaboration

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Common Map API version 2

This is an early draft of CMAPI v2 concepts to be used a starting point for defnition of an inital CMAPI 2.0.0 release. Everything contained in this document is subject to change without notice

Overview

Common Map API v2 is a follow on solution to CMAPI 1.3.0 that expands the scope of what CMAPI can be used for and provides a more concise API that adresses a number of deficiencies found in previous versions.

CMAPI v2 will attempt to create a new set of geospatial primitive objects that are reusable and effective for rich interaction between the data provider and map over CMAPI. CMAPI v2 departs from the reliance on text document formatted data such as KML and GeoJSON and provides rich interaction for only data provided via the primitive mechinism.

CMAPI v2 will allow documents such as KML and GeoJSON to be passed to a map, but only for display. Any application desiring to have interaction usch as click events, eding, selction will need to use the geo primitive objects. Passing large blobs of KML with nor way to gaurantee existence of ids, and now ay to enforce unique ids has created a problematic msituation for devlopers to create consitent behavior when interacting with data that is not uniquely adressable.

CMAPI v2 aslo aims to provide actual language implmentations of these geospatial primitives that are auto generated from the same JSON Schmea that this documentaiton id generated from. These code geernated obecjts adhere to the desing documented here, but are provided in target programming languages for dvelopment use. There is also a Google Protocal Buffers binary serialization capability that allows these geo primitive objects to be tranaslated tfrom any supported language to a binary form and desrialized in a differnt programming lanuge runtime.

The current supported languages are Java and JavaScript.

Build Instructions

  1. Download and install Node JS
  2. Open a Commnad Line Interface (CLI) from CMAPI2 root dreictory
  3. Type: node generate.js
  4. Output of the Dcouemtnation, Java, and JavaScript outputs will be in the "dist" folder at the root of the CMAPI2 project. the dist folder will be cleared and overwritten each time you run the build.
  5. To compile the Java source code into a jar file run: node compile.js

See the CMAPI Github space for source code

Visit cmapi.org for more information about previous versions of CMAPI