NodeJS SDK for mapfig Studio
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
MapFigSDK
test
.gitattributes
.gitignore
README.md
instructions.txt

README.md

NodeJS-SDKs-Version-2.0.1

MapFig SDK for NodeJS

Setup:

  • Extract mapfig.zip at any location.

Tests:

Run following commands for each test:

cd mapfig node test/testGet.js node test/testSave.js node test/testUpdate.js node test/testGeolocation.js (additional - just to test Geolocation call)

Important Notes:

Since NodeJS is asynchronous, all the calls involving network calls are also asynchronous. Calls should be made as follows:

Get Call:

api.get(430, function (map) { console.log(JSON.stringify(map.getWholeDataArray())); });

Save Call:

api.save(map, function(response) { console.log(response); });

Update Call:

api.update(map, function(response) { console.log(response); });

GeoLocation Call:

GeoLocation.getLatLong("Germany", function(data) { console.log(data.toString()); });

Marker SetLatLong:

marker.setLatLng("Germany", function() { //Do something after Geo is set });

Point SetLatLong:

point.setLatLng("Germany", function() { //Do something after Geo is set });