Skip to content

Different API implementations for map editing

blickly edited this page Nov 11, 2011 · 4 revisions

Non-concurrent API

CREATE {json string} returns id

PUT {id, json string}

GET {id} returns json string

DELETE probably unsupported

Points/edges API

POINTS

CREATE {mapId, lat, long} returns pointId

GET {mapId, pointId} returns (lat,long)

EDGES

CREATE {mapId, pointId1, pointId2} returns id

GET {mapId, edgeId} returns (pointId1, pointId2)

GET {mapId, pointId} returns set({edgeId})

Edges-only API

CREATE {mapId, lat1, long1, lat2, long2} returns edgeId

GET {mapId, edgeId} returns {lat1, long1, lat2, long2}

GET {mapId, lat1,lat2} returns set({edgeId})