Introduction

This is a documentation page for the mapfig API. Our APIs works with a variety of programing languages. You can use the SDKs to dynamically create, retrieve and update your maps for mapfig Cloud or mapfig Mobile. Be sure to change the URL to the url of your installation.

SDKs can be downloaded at https://github.com/MapFig


api.get(ID); // Get Whole Map From Studio

api.update(MAP); // Update Map data

api.save(MAP); // Create New Map


api.get(ID) # Get Whole Map From Studio

api.update(MAP) # Update Map data

api.save(MAP) # Create New Map


api.get(ID) // Get Whole Map From Studio

api.update(MAP) // Update Map data

api.save(MAP) // Create New Map


$api.get(ID) // Get Whole Map From Studio

$api.update(MAP) // Update Map data

$api.save(MAP) // Create New Map


api.get(ID) // Get Whole Map From Studio

api.update(MAP) // Update Map data

api.save(MAP) // Create New Map


api.get(ID) // Get Whole Map From Studio

api.update(MAP) // Update Map data

api.save(MAP) // Create New Map

GET

Get the Map from studio URL by Passing the Map Id to the get method. You'll get a Map object. Make sure, user with given API key is the owner or has the complete access to the Map.

Input Data

id:
Integer Map ID

Output Data

map:
Map A Map Object

MapFigApplication api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

try {
	Map map = api.get(491); // it'll return the Map Object. 491 is the user's MapId
	
	System.out.println(map.getWholeDataArray());
	
	// TODO with Response.
	//print_r(map.getWholeDataArray());
	
} catch (Exception e) {
	System.out.println(e.getMessage());
}


api = MapFigApplication(studioURL="https://studio.mapfig.com", apiKey="Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa")

try:
	map = api.get(555)  # Tested on ID 508
	print map.getWholeDataArray()

except Exception as ex:
	print ex.message


var api:MfMapFigApplication = MfMapFigApplication(studioURL: "https:/studio.mapfig.com", apiKey: "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa")

var map = api.get(491); // it'll return the Map Object. 491 is the user's MapId
println(map!.getWholeDataArray());


$api = new MapFigApplication(STUDIO_URL, APIKEY);

try {
	$map = $api->get(489); // it'll return the Map Object. 424 is the user's MapId
	
	// TODO with Response.
	print_r($map->getWholeDataArray());
	
} catch (Exception $e) {
	echo $e->getMessage();
}


var api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

try {
	/*Pass along callback as NodeJS is asynchronous*/
	api.get(492, function (map) {
		console.log(JSON.stringify(map.getWholeDataArray()));
	});
	
} catch (e) {
	
}


MapFigApplication api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

try
{
	Map map = api.get(491); // it'll return the Map Object. 491 is the user's MapId
	Console.WriteLine(map.getWholeDataArray());
}
catch (Exception e)
{
	Console.WriteLine(e.Message);
}

Update

First Get the map using about 'GET' method. Or create your own map Object where map ID will be required.

Input Data

map:
Map Map Object

Output Data (json)

id:
Integer Map ID
view:
String A URL to view Map
download:
String A URL to download Map
iframe:
String HTML iFrame Code, for the sites.

MapFigApplication api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

Map map;
try {
	map = api.get(491); // First of all get the map by ID
	
	// TODO with map - Update Map object here
	/* Update the Map here*/
	map.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
	map.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
	map.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
	map.setUseCluster(true);  // Default false
	map.setOverlayEnable(true);  // Default false
	map.setOverlayTitle("Updated Overlay Title");  // Default NONE
	map.setOverlayContent("Updated Overlay Content");  // Default NONE
	map.setOverlayBlurb("Example Blurb");  // Default NONE
	map.setLegendEnable(false);  // Default false
	map.setLegendContent("HTML content here");  // Default NONE
	map.setProjectId(0);	// Default 0 or change it to the account owner's project ID
	map.setShowSidebar(true);  // Default true
	map.setShowExport(true);  // Default false
	map.setShowMeasure(true);  // Default false
	map.setShowMinimap(true);  // Default false
	map.setShowSearch(true);  // Default false
	map.setShowFilelayer(false);  // Default false // shows local file upload button
	map.setShowSvg(false);  // Default false
	map.setShowStaticSidebar(false);  // Default false
	map.setStaticSidebarContent("");  // Default NONE
	
	/* Add Image Overlay */
	String name = "Overlay Title goes here"; // will not be displayed
	
	Point upperRightCornor = new Point(0.0, 0.0); // Upper Right Cornor Of Overlay Image
	upperRightCornor.setLatLng("Canada");
	
	Point bottomLeftCornor = new Point(0.0, 0.0); // Bottom Left Cornor Of image
	bottomLeftCornor.setLatLng("United State Of America");
	
	String imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.PNG";
	String popupContent = "<h3>Image Overlay Content here</h3>";
	
	ImageOverlay imageOverlay1 = new ImageOverlay(name, upperRightCornor, bottomLeftCornor, imageUrl, popupContent); // Create the overlay
	map.addImageOverlay(imageOverlay1); // Add as many overlays as you want
	
	//map.dropAllImageOverlays(); // If you want to delete all image overlays
	
	
	// map.dropAllShapes(); it'll remove all the shapes from Map
	// You can add more Markers
	Marker marker = new Marker(48.856614, 2.3522219000000177); // One Way - provide Latitude/Longitude directly
	/* Properties */
	marker.setLocation("New York");
	marker.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
	/* Advance Properties */
	marker.setShowGetDirection(false);
	marker.setShowInfoBox(true);
	marker.setShowLocationOnPopup(true);
	marker.setHideLabel(true);
	/* Styling */
	marker.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....) 
										// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
	marker.setMarkerColor(""); // Default NONE, available options are 
										// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
										//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)
	map.addShape(marker);
	
	
	// Save the map and get the MapID if successfully saved
	String response = "";
	try {
		// TODO with response
		response = api.update(map);
		// Parse JSON String
		JSONParser parser = new JSONParser();
		
		try {
			JSONObject obj = (JSONObject) parser.parse(response); // JSON Object
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	} catch (Exception e) {
		// Handle the Exception Here
		System.out.println(e.getMessage());
	}
	
	
	// TODO with Response.
	System.out.println(response);
	
} catch (Exception e2) {
	// TODO Auto-generated catch block
	e2.printStackTrace();
}


api = MapFigApplication(studioURL="https://studio.mapfig.com", apiKey="Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa")

try:
	map = api.get(555)
	map.setLayerId(1)  # Default 1 or change it to the account owner's layer ID
	map.setGroupId(0)  # Default 0 or change it to the account owner's layer group ID
	map.setPassword("")  # Default NONE or change it to the Desire Password to protact the Map
	map.setUseCluster(True)  # Default False
	map.setOverlayEnable(True)  # Default False
	map.setOverlayTitle("Updated Overlay Title")  # Default NONE
	map.setOverlayContent("Updated Overlay Content")  # Default NONE
	map.setOverlayBlurb("Example Blurb")  # Default NONE
	map.setLegendEnable(False)  # Default False
	map.setLegendContent("HTML content here")  # Default NONE
	map.setProjectId(0)	 # Default 0 or change it to the account owner's project ID
	map.setShowSidebar(True)  # Default True
	map.setShowExport(True)  # Default False
	map.setShowMeasure(True)  # Default False
	map.setShowMinimap(True)  # Default False
	map.setShowSearch(True)  # Default False
	map.setShowFilelayer(False)  # Default False # shows local file upload button
	map.setShowSvg(False)  # Default False
	map.setShowStaticSidebar(False)  # Default False
	map.setStaticSidebarContent("")  # Default NONE

	# Add Image Overlay
	name = "Overlay Title goes here"  # will not be displayed
	
	upperRightCornor = Point(0.0, 0.0)  # Upper Right Cornor Of Overlay Image
	upperRightCornor.setLatLng("Canada")
	
	bottomLeftCornor = Point(0.0, 0.0)  # Bottom Left Cornor Of image
	bottomLeftCornor.setLatLng("United State Of America")
	
	imageUrl = "http: #www.YOUR_IMAGE_URL.com/PATH.PNG"
	popupContent = "<h3>Image Overlay Content here</h3>"
	
	imageOverlay1 = ImageOverlay(name, upperRightCornor, bottomLeftCornor, imageUrl, popupContent)  # Create the overlay
	map.addImageOverlay(imageOverlay1)  # Add as many overlays as you want

	marker = Marker(48.856614, 2.3522219000000177)  # One Way - provide Latitude/Longitude directly

	# Properties
	marker.setLocation("New York")
	marker.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>")

	# Advance Properties
	marker.setShowGetDirection(False)
	marker.setShowInfoBox(True)
	marker.setShowLocationOnPopup(True)
	marker.setHideLabel(True)

	# Styling
	marker.setMarkerStyle("")  # Default NONE, available options are (user,cog,leaf,home,.....)
							   # Complete list can be found here http: #fortawesome.github.io/Font-Awesome/icons/
	marker.setMarkerColor("")  # Default NONE, available options are
							   # (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
							   #  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)
	map.addShape(marker)

	try:
		response = api.update(map)
		print response.text

		json_obj = response.json()
		print json_obj

	except Exception as ex:
		print ex.message

except Exception as ex:
	print ex.message


var api:MfMapFigApplication = MfMapFigApplication(studioURL: "https://studio.mapfig.com", apiKey: "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa")
var map = api.get(430); // it'll return the Map Object. 430 is the user's MapId

var mapName: String = "My Map"
var mapHeight: Int = 450
var mapWidth: Int = 950
var mapZoom: Int = 4
var mapCenter:MfPoint = MfPoint(x: 48.856614, y: 2.3522219); // Latitude, Longitude
/*
* -- Alternative Way --
* var mapCenter:MfPoint = MfPoint(x: 0, y:0);
*       *
*       * get the Latitude/Longitude in array by providing the Address.
*       *
*      mapCenter.setLatLng("United States of America"); // Sets the Point(Lat,Lng)
*/



/* These are not required unless you want to change something.
* the Default value is set weather or not you write them here.
*/

map!.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
map!.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
map!.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
map!.setUseCluster(false);  // Default false
map!.setOverlayEnable(false);  // Default false
map!.setOverlayTitle("");  // Default NONE
map!.setOverlayContent("");  // Default NONE
map!.setOverlayBlurb("");  // Default NONE
map!.setLegendEnable(false);  // Default false
map!.setLegendContent("HTML content here");  // Default NONE
map!.setProjectId(0);    // Default 0 or change it to the account owner's project ID
map!.setShowSidebar(true);  // Default true
map!.setShowExport(false);  // Default false
map!.setShowMeasure(false);  // Default false
map!.setShowMinimap(false);  // Default false
map!.setShowSearch(false);  // Default false
map!.setShowFilelayer(false);  // Default false // shows local file upload button
map!.setShowSvg(false);  // Default false
map!.setShowStaticSidebar(false);  // Default false
map!.setStaticSidebarContent("");  // Default NONE
/* Add Image Overlay */
var name = "Overlay Title goes here"; // will not be displayed

var upperRightCornor = MfPoint(x: 0.0, y: 0.0); // Upper Right Cornor Of Overlay Image
upperRightCornor.setLatLng("Canada");

var bottomLeftCornor = MfPoint(x: 0.0, y: 0.0); // Bottom Left Cornor Of image
bottomLeftCornor.setLatLng("United State Of America");

var imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
var popupContent = "<h3>Image Overlay Content here</h3>";

var imageOverlay1 = MfImageOverlay(name: name, upperRightCornor: upperRightCornor, bottomLeftCornor: bottomLeftCornor, imageURL: imageUrl, popupContent: popupContent); // Create the overlay

map!.addImageOverlay(imageOverlay1); // Add as many overlays as you want

//map.dropAllImageOverlays(); // If you want to delete all image overlays
/* End Map options */



/* Destroy/Delete All Markers From Map */
//map!.dropAllShapes()



/* Create First Marker */
var marker1:MfMarker = MfMarker(latitude: 48.856614, longitude: 2.3522219000000177);
/* Properties */
marker1.setLocation("Paris, France");
marker1.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker1.setShowGetDirection(false);
marker1.setShowInfoBox(false);
marker1.setShowLocationOnPopup(true);
marker1.setHideLabel(true);
/* Styling */
marker1.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....)
// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker1.setMarkerColor(""); // Default NONE, available options are
// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)




/* Create Second Marker */
var marker2:MfMarker = MfMarker(latitude: 0, longitude: 0);
/*
* set the Latitude/Longitude by providing the Address.
*/
marker2.setLatLng("Germany");


/* Properties */
//marker2.setLocation("Germany"); // Here Default location is Set as
// "Paris, France". but you can still change it to your desired.
// Just uncomment the link and Set the Value
marker2.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker2.setShowGetDirection(false);
marker2.setShowInfoBox(false);
marker2.setShowLocationOnPopup(true);
marker2.setHideLabel(true);
/* Styling */
marker2.setMarkerStyle("home"); // Default NONE, available options are (user,cog,leaf,home,.....)
// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker2.setMarkerColor("red"); // Default NONE, available options are
// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)


/* Add Markers to the Map */
map!.addShape(marker1);
map!.addShape(marker2);


// Save the map and get the MapID if successfully saved
var response: NSDictionary = api.update(map!);


// TODO with Response.
println(response);


$api = new MapFigApplication(STUDIO_URL, APIKEY);

try {
	$map = $api->get(489); // id is the user's Map Id
	
	
	/* Update the Map here*/
	$map->layerId = 1;  // Default 1 or change it to the account owner's layer ID
	$map->groupId = 0;  // Default 0 or change it to the account owner's layer group ID
	$map->password = "";  // Default NONE or change it to the Desire Password to protact the Map
	$map->useCluster = true;  // Default false
	$map->overlayEnable = true;  // Default false
	$map->overlayTitle = "Updated Overlay Title";  // Default NONE
	$map->overlayContent = "Updated Overlay Content";  // Default NONE
	$map->overlayBlurb = "Example Blurb";  // Default NONE
	$map->legendEnable = false;  // Default false
	$map->legendContent = "HTML content here";  // Default NONE
	$map->projectId = 0;	// Default 0 or change it to the account owner's project ID
	$map->showSidebar = true;  // Default true
	$map->showExport = true;  // Default false
	$map->showMeasure = true;  // Default false
	$map->showMinimap = true;  // Default false
	$map->showSearch = true;  // Default false
	$map->showFilelayer = false;  // Default false // shows local file upload button
	$map->showSvg = false;  // Default false
	$map->showStaticSidebar = false;  // Default false
	$map->staticSidebarContent = "";  // Default NONE
	
	/* Add Image Overlay */
	$name = "Overlay Title goes here"; // will not be displayed
	
	$upperRightCornor = new Point(); // Upper Right Cornor Of Overlay Image
	$upperRightCornor->setLatLng("Pakistan");
	
	$bottomLeftCornor = new Point(); // Bottom Left Cornor Of image
	$bottomLeftCornor->setLatLng("India");
	
	$imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
	$popupContent = "<h3>Image Overlay Content here</h3>";
	
	$imageOverlay1 = new ImageOverlay($name, $upperRightCornor, $bottomLeftCornor, $imageUrl, $popupContent); // Create the overlay
	$map->addImageOverlay($imageOverlay1); // Add as many overlays as you want
	
	$map->dropAllImageOverlays(); // If you want to delete all image overlays
	/* End Map options */
	
	
	
	// $map->dropAllShapes(); it'll remove all the shapes from Map
	// You can add more Markers
	$marker = new Marker(48.856614, 2.3522219000000177); // One Way - provide Latitude/Longitude directly
	/* Properties */
	$marker->location = "New York";
	$marker->description = "<p>This is where you can write the <strong>HTML</strong> code too</p>";
	/* Advance Properties */
	$marker->showGetDirection    = false;
	$marker->showInfoBox         = true;
	$marker->showLocationOnPopup = true;
	$marker->hideLabel           = true;
	/* Styling */
	$marker->markerStyle         = ""; // Default NONE, available options are (user,cog,leaf,home,.....) 
										// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
	$marker->markerColor         = ""; // Default NONE, available options are 
										// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
										//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)
	//$map->addShape($marker);
	
	
	
	// Save the map and get the MapID if successfully saved
	$response = "";
	try {
		$response = $api->update($map);
	} catch (Exception $e) {
		// Handle the Exception Here
		echo $e->getMessage();
	}
	
	
	// TODO with Response.
	echo $response;
	
	
} catch (Exception $e) {
	echo $e->getMessage();
}


var api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

try{
	/*All the API calls are asynchronous*/
	api.get(493, function(map) {
		
		/* Update the Map here*/
		map.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
		map.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
		map.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
		map.setUseCluster(true);  // Default false
		map.setOverlayEnable(true);  // Default false
		map.setOverlayTitle("Updated Overlay Title");  // Default NONE
		map.setOverlayContent("Updated Overlay Content");  // Default NONE
		map.setOverlayBlurb("Example Blurb");  // Default NONE
		map.setLegendEnable(false);  // Default false
		map.setLegendContent("HTML content here");  // Default NONE
		map.setProjectId(0);	// Default 0 or change it to the account owner's project ID
		map.setShowSidebar(true);  // Default true
		map.setShowExport(true);  // Default false
		map.setShowMeasure(true);  // Default false
		map.setShowMinimap(true);  // Default false
		map.setShowSearch(true);  // Default false
		map.setShowFilelayer(false);  // Default false // shows local file upload button
		map.setShowSvg(false);  // Default false
		map.setShowStaticSidebar(false);  // Default false
		map.setStaticSidebarContent("");  // Default NONE

		
		/* Add Image Overlay */
		var name = "Overlay Title goes here"; // will not be displayed

		var upperRightCornor = new Point(0.0, 0.0); // Upper Right Cornor Of Overlay Image
		try {
			upperRightCornor.setLatLng("Canada");
		} catch (e) {
			console.log(JSON.stringify(e));
		}

		var bottomLeftCornor = new Point(0.0, 0.0); // Bottom Left Cornor Of image
		try {
			bottomLeftCornor.setLatLng("United State Of America");
		} catch (e) {
			console.log(JSON.stringify(e));
		}

		var imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
		var popupContent = "<h3>Image Overlay Content here</h3>";

		var imageOverlay1 = new ImageOverlay(name, upperRightCornor, bottomLeftCornor, imageUrl, popupContent); // Create the overlay

		map.addImageOverlay(imageOverlay1); // Add as many overlays as you want

		//map.dropAllImageOverlays(); // If you want to delete all image overlays
		/* End Map options */
		
		
		
		
		
		
		
		var marker = new Marker(48.856614, 2.3522219000000177); // One Way - provide Latitude/Longitude directly
		/* Properties */
		marker.setLocation("New York");
		marker.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
		/* Advance Properties */
		marker.setShowGetDirection(false);
		marker.setShowInfoBox(true);
		marker.setShowLocationOnPopup(true);
		marker.setHideLabel(true);
		/* Styling */
		marker.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....) 
											// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
		marker.setMarkerColor(""); // Default NONE, available options are 
											// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
											//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)
		map.addShape(marker);

		try {
			api.update(map, function(response) {
				console.log(response);
			});
		}catch(e) {
			console.log(JSON.stringify(e));
		}
	}); // First of all get the map by ID

}catch(e) {
	console.log(JSON.stringify(e));
}


MapFigApplication api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

Map map = null;

try
{
	map = api.get(430);  // First of all get the map by ID
}
catch (Exception e)
{
	Console.WriteLine(e.Message);
}


if (map != null) // if map Found
{

	// TODO with map - Update Map object here
	/* Update the Map here*/
	map.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
	map.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
	map.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
	map.setUseCluster(true);  // Default false
	map.setOverlayEnable(true);  // Default false
	map.setOverlayTitle("Updated Overlay Title");  // Default NONE
	map.setOverlayContent("Updated Overlay Content");  // Default NONE
	map.setOverlayBlurb("Example Blurb");  // Default NONE
	map.setLegendEnable(false);  // Default false
	map.setLegendContent("HTML content here");  // Default NONE
	map.setProjectId(0);	// Default 0 or change it to the account owner's project ID
	map.setShowSidebar(true);  // Default true
	map.setShowExport(true);  // Default false
	map.setShowMeasure(true);  // Default false
	map.setShowMinimap(true);  // Default false
	map.setShowSearch(true);  // Default false
	map.setShowFilelayer(false);  // Default false // shows local file upload button
	map.setShowSvg(false);  // Default false
	map.setShowStaticSidebar(false);  // Default false
	map.setStaticSidebarContent("");  // Default NONE

	// map.dropAllShapes(); it'll remove all the shapes from Map
	// You can add more Markers
	Marker marker = new Marker(48.856614, 2.3522219000000177); // One Way - provide Latitude/Longitude directly
	/* Properties */
	marker.setLocation("New York");
	marker.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
	/* Advance Properties */
	marker.setShowGetDirection(false);
	marker.setShowInfoBox(true);
	marker.setShowLocationOnPopup(true);
	marker.setHideLabel(true);
	/* Styling */
	marker.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....) 
	// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
	marker.setMarkerColor(""); // Default NONE, available options are 
	// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
	//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)
	map.addShape(marker);



	// Save the map and get the MapID if successfully saved
	String response = api.update(map);

	// TODO with response
	Console.WriteLine(response);

}

Save (Create Map)

Create your own map Object where map ID is not required and will be ignored.

Input Data

map:
Map Map Object

Output Data (json)

id:
Integer New Map ID
view:
String A URL to view Map
download:
String A URL to download Map
iframe:
String HTML iFrame Code, for the sites.

MapFigApplication api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

String mapName = "My Map";
Integer mapHeight = 450;
Integer mapWidth = 950;
Integer mapZoom = 4;
Point mapCenter = new Point(48.856614, 2.3522219); // Latitude, Longitude
			/*
			 * -- Alternative Way --
			 * Point p = new Point();
			 *	try {
			 *		 *
			 *		 * get the Latitude/Longitude in array by providing the Address.
			 *		 * Throws Exception if the Address is incorrect
			 *		 *
			 *		mapCenter = p.setLatLng("United States of America"); // Sets the Point(Lat,Lng)
			 *	} catch (Exception e) {
			 *		// Handle the Exception Here
			 *		echo e.getMessage();
			 *	}
			 */
Map map = new Map(mapName, mapHeight, mapWidth, mapZoom, mapCenter);

/* These are not required unless you want to change something. 
 * the Default value is set weather or not you write them here.
 */
map.setId(null);
map.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
map.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
map.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
map.setUseCluster(false);  // Default false
map.setOverlayEnable(false);  // Default false
map.setOverlayTitle("");  // Default NONE
map.setOverlayContent("");  // Default NONE
map.setOverlayBlurb("");  // Default NONE
map.setLegendEnable(false);  // Default false
map.setLegendContent("HTML content here");  // Default NONE
map.setProjectId(0);	// Default 0 or change it to the account owner's project ID
map.setShowSidebar(true);  // Default true
map.setShowExport(false);  // Default false
map.setShowMeasure(false);  // Default false
map.setShowMinimap(false);  // Default false
map.setShowSearch(false);  // Default false
map.setShowFilelayer(false);  // Default false // shows local file upload button
map.setShowSvg(false);  // Default false
map.setShowStaticSidebar(false);  // Default false
map.setStaticSidebarContent("");  // Default NONE

/* Add Image Overlay */
String name = "Overlay Title goes here"; // will not be displayed

Point upperRightCornor = new Point(0.0, 0.0); // Upper Right Cornor Of Overlay Image
try {
	upperRightCornor.setLatLng("Canada");
} catch (Exception e2) {
	// TODO Auto-generated catch block
	e2.printStackTrace();
}

Point bottomLeftCornor = new Point(0.0, 0.0); // Bottom Left Cornor Of image
try {
	bottomLeftCornor.setLatLng("United State Of America");
} catch (Exception e2) {
	// TODO Auto-generated catch block
	e2.printStackTrace();
}

String imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
String popupContent = "<h3>Image Overlay Content here</h3>";

ImageOverlay imageOverlay1 = new ImageOverlay(name, upperRightCornor, bottomLeftCornor, imageUrl, popupContent); // Create the overlay

map.addImageOverlay(imageOverlay1); // Add as many overlays as you want

//map.dropAllImageOverlays(); // If you want to delete all image overlays
/* End Map options */


/* Create First Marker */
Marker marker1 = null;
try {
	marker1 = new Marker(48.856614, 2.3522219000000177);
} catch (MapFigException e1) {
	// TODO Auto-generated catch block
	e1.printStackTrace();
} // One Way - provide Latitude/Longitude directly
/* Properties */
marker1.setLocation("Paris, France");
marker1.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker1.setShowGetDirection(false);
marker1.setShowInfoBox(false);
marker1.setShowLocationOnPopup(true);
marker1.setHideLabel(true);
/* Styling */
marker1.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....) 
									// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker1.setMarkerColor(""); // Default NONE, available options are 
									// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
									//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)


/* Create Second Marker */
Marker marker2 = null;
try {
	marker2 = new Marker();
} catch (MapFigException e1) {
	// TODO Auto-generated catch block
	e1.printStackTrace();
} // Other Way,
try {
	/*
	 * set the Latitude/Longitude by providing the Address.
	 * Throws Exception if the Latitude/Longitude is incorrect
	 */
	marker2.setLatLng("Germany");
} catch (Exception e) {
	// Handle the Exception Here
	System.out.println(e.getMessage());
}

/* Properties */
//marker2.location = "Germany"; // Here Default location is Set as 
										// "Paris, France". but you can still change it to your desired. 
										// Just uncomment the link and Set the Value
marker2.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker2.setShowGetDirection(false);
marker2.setShowInfoBox(false);
marker2.setShowLocationOnPopup(true);
marker2.setHideLabel(true);
/* Styling */
marker2.setMarkerStyle("home"); // Default NONE, available options are (user,cog,leaf,home,.....) 
									// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker2.setMarkerColor("red"); // Default NONE, available options are 
									// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
									//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

/* Add Markers to the Map */
map.addShape(marker1);
map.addShape(marker2);


// Save the map and get the MapID if successfully saved
String response = "";
try {
	response = api.save(map);
} catch (Exception e) {
	// Handle the Exception Here
	System.out.println(e.getMessage());
}


// TODO with Response.
System.out.println(response);
// Parse JSON String
JSONParser parser = new JSONParser();

try {
	JSONObject obj = (JSONObject) parser.parse(response); // JSON Object
} catch (ParseException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}


api = MapFigApplication(studioURL="https://studio.mapfig.com", apiKey="Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa")

mapName = "My Map"
mapHeight = 450
mapWidth = 950
mapZoom = 4
mapCenter = Point(48.856614, 2.3522219)

map = Map(mapName, mapHeight, mapWidth, mapZoom, mapCenter)
map.setId(None)
map.setLayerId(1)  # Default 1 or change it to the account owner's layer ID
map.setGroupId(0)  # Default 0 or change it to the account owner's layer group ID
map.setPassword("")  # Default NONE or change it to the Desire Password to protact the Map
map.setUseCluster(False)  # Default False
map.setOverlayEnable(False)  # Default False
map.setOverlayTitle("")  # Default NONE
map.setOverlayContent("")  # Default NONE
map.setOverlayBlurb("")  # Default NONE
map.setLegendEnable(False)  # Default False
map.setLegendContent("HTML content here")  # Default NONE
map.setProjectId(0)	# Default 0 or change it to the account owner's project ID
map.setShowSidebar(True)  # Default True
map.setShowExport(False)  # Default False
map.setShowMeasure(False)  # Default False
map.setShowMinimap(False)  # Default False
map.setShowSearch(False)  # Default False
map.setShowFilelayer(False)  # Default False # shows local file upload button
map.setShowSvg(False)  # Default False
map.setShowStaticSidebar(False)  # Default False
map.setStaticSidebarContent("")  # Default NONE

# Add Image Overlay Here
name = "Overlay Title goes here"  # Will not be displayed
upperRightCornor = Point(0.0, 0.0)  # Upper Right Cornor Of Overlay Image
try:
	upperRightCornor.setLatLng("Canada")
except Exception as ex:
	ex.message

bottomLeftCornor = Point(0.0, 0.0)  # Upper Right Cornor Of Overlay Image
try:
	bottomLeftCornor.setLatLng("United State Of America")
except Exception as ex:
	ex.message

imageUrl = "http: #www.YOUR_IMAGE_URL.com/PATH.JPG"
popupContent = "<h3>Image Overlay Content here</h3>"
imageOverlay1 = ImageOverlay(name, upperRightCornor, bottomLeftCornor, imageUrl, popupContent)  # Create the overlay

map.addImageOverlay(imageOverlay1)  # Add as many overlays as you want

try:
	marker1 = Marker(48.856614, 2.3522219000000177)
	
	marker1.setLocation("Paris, France")
	marker1.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>")
	
	# Advance Properties
	marker1.setShowGetDirection(False)
	marker1.setShowInfoBox(False)
	marker1.setShowLocationOnPopup(True)
	marker1.setHideLabel(True)
	
	# Styling
	marker1.setMarkerStyle("")  # Default NONE, available options are (user,cog,leaf,home,.....) 
								# Complete list can be found here http: #fortawesome.github.io/Font-Awesome/icons/
	marker1.setMarkerColor("")  # Default NONE, available options are 
								# (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
								# Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

	map.addShape(marker1)

except Exception as ex:
	print ex.message

try:
	marker2 = Marker()
	marker2.setLatLng("Germany")
	
	marker2.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>")
	
	# Advance Properties
	marker2.setShowGetDirection(False)
	marker2.setShowInfoBox(False)
	marker2.setShowLocationOnPopup(True)
	marker2.setHideLabel(True)
	
	# Styling
	marker2.setMarkerStyle("home")  # Default NONE, available options are (user,cog,leaf,home,.....) 
									# Complete list can be found here http: #fortawesome.github.io/Font-Awesome/icons/
	marker2.setMarkerColor("red")   # Default NONE, available options are
									# (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
									#  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

	map.addShape(marker2)

except Exception as ex:
	print ex.message


try:
	response = api.save(map)
	print response.text

	json_obj = response.json()
	print json_obj

except Exception as ex:
	print ex.message


var api:MfMapFigApplication = MfMapFigApplication(studioURL: "https:/studio.mapfig.com", apiKey: "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa")

var mapName: String = "My Map"
var mapHeight: Int = 450
var mapWidth: Int = 950
var mapZoom: Int = 4
var mapCenter:MfPoint = MfPoint(x: 48.856614, y: 2.3522219); // Latitude, Longitude
/*
* -- Alternative Way --
* var mapCenter:MfPoint = MfPoint(x: 0, y:0);
*       *
*       * get the Latitude/Longitude in array by providing the Address.
*       *
*      mapCenter.setLatLng("United States of America"); // Sets the Point(Lat,Lng)
*/

var map = MfMap(name: mapName, height: mapHeight, width: mapWidth, zoom: mapZoom, center: mapCenter);

/* These are not required unless you want to change something.
* the Default value is set weather or not you write them here.
*/

map.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
map.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
map.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
map.setUseCluster(false);  // Default false
map.setOverlayEnable(false);  // Default false
map.setOverlayTitle("");  // Default NONE
map.setOverlayContent("");  // Default NONE
map.setOverlayBlurb("");  // Default NONE
map.setLegendEnable(false);  // Default false
map.setLegendContent("HTML content here");  // Default NONE
map.setProjectId(0);    // Default 0 or change it to the account owner's project ID
map.setShowSidebar(true);  // Default true
map.setShowExport(false);  // Default false
map.setShowMeasure(false);  // Default false
map.setShowMinimap(false);  // Default false
map.setShowSearch(false);  // Default false
map.setShowFilelayer(false);  // Default false // shows local file upload button
map.setShowSvg(false);  // Default false
map.setShowStaticSidebar(false);  // Default false
map.setStaticSidebarContent("");  // Default NONE

/* Add Image Overlay */
var name = "Overlay Title goes here"; // will not be displayed

var upperRightCornor = MfPoint(x: 0.0, y: 0.0); // Upper Right Cornor Of Overlay Image
upperRightCornor.setLatLng("Canada");

var bottomLeftCornor = MfPoint(x: 0.0, y: 0.0); // Bottom Left Cornor Of image
bottomLeftCornor.setLatLng("United State Of America");

var imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
var popupContent = "<h3>Image Overlay Content here</h3>";

var imageOverlay1 = MfImageOverlay(name: name, upperRightCornor: upperRightCornor, bottomLeftCornor: bottomLeftCornor, imageURL: imageUrl, popupContent: popupContent); // Create the overlay

map.addImageOverlay(imageOverlay1); // Add as many overlays as you want

//map.dropAllImageOverlays(); // If you want to delete all image overlays
/* End Map options */


/* Create First Marker */
var marker1:MfMarker = MfMarker(latitude: 48.856614, longitude: 2.3522219000000177);
/* Properties */
marker1.setLocation("Paris, France");
marker1.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker1.setShowGetDirection(false);
marker1.setShowInfoBox(false);
marker1.setShowLocationOnPopup(true);
marker1.setHideLabel(true);
/* Styling */
marker1.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....)
// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker1.setMarkerColor(""); // Default NONE, available options are
// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

/* Create Second Marker */
var marker2:MfMarker = MfMarker(latitude: 0, longitude: 0);
/*
* set the Latitude/Longitude by providing the Address.
*/
marker2.setLatLng("Germany");


/* Properties */
//marker2.setLocation("Germany"); // Here Default location is Set as
// "Paris, France". but you can still change it to your desired.
// Just uncomment the link and Set the Value
marker2.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker2.setShowGetDirection(false);
marker2.setShowInfoBox(false);
marker2.setShowLocationOnPopup(true);
marker2.setHideLabel(true);
/* Styling */
marker2.setMarkerStyle("home"); // Default NONE, available options are (user,cog,leaf,home,.....)
// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker2.setMarkerColor("red"); // Default NONE, available options are
// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)


/* Add Markers to the Map */
map.addShape(marker1);
map.addShape(marker2);


// Save the map and get the MapID if successfully saved
var response: NSDictionary = api.save(map);


// TODO with Response.
println(response);


$api = new MapFigApplication(STUDIO_URL, APIKEY);

$mapName = "My Map";
$mapHeight = 450;
$mapWidth = 950;
$mapZoom = 4;
$mapCenter = new Point(48.856614, 2.3522219); // Latitude, Longitude
			/*
			 * -- Alternative Way --
			 * $p = new Point();
			 *	try {
			 *		 *
			 *		 * get the Latitude/Longitude in array by providing the Address.
			 *		 * Throws Exception if the Address is incorrect
			 *		 *
			 *		$mapCenter = $p->setLatLng("United States of America"); // Sets the Point(Lat,Lng)
			 *	} catch (Exception $e) {
			 *		// Handle the Exception Here
			 *		echo $e->getMessage();
			 *	}
			 */
$map = new Map($mapName, $mapHeight, $mapWidth, $mapZoom, $mapCenter);

/* These are not required unless you want to change something. 
 * the Default value is set weather or not you write them here.
 */
$map->id = null;
$map->layerId = 1;  // Default 1 or change it to the account owner's layer ID
$map->groupId = 0;  // Default 0 or change it to the account owner's layer group ID
$map->password = "";  // Default NONE or change it to the Desire Password to protact the Map
$map->useCluster = false;  // Default false
$map->overlayEnable = false;  // Default false
$map->overlayTitle = "";  // Default NONE
$map->overlayContent = "";  // Default NONE
$map->overlayBlurb = "";  // Default NONE
$map->legendEnable = false;  // Default false
$map->legendContent = "HTML content here";  // Default NONE
$map->projectId = 0;	// Default 0 or change it to the account owner's project ID
$map->showSidebar = true;  // Default true
$map->showExport = false;  // Default false
$map->showMeasure = false;  // Default false
$map->showMinimap = false;  // Default false
$map->showSearch = false;  // Default false
$map->showFilelayer = false;  // Default false // shows local file upload button
$map->showSvg = false;  // Default false
$map->showStaticSidebar = false;  // Default false
$map->staticSidebarContent = "";  // Default NONE

/* Add Image Overlay */
$name = "Overlay Title goes here"; // will not be displayed

$upperRightCornor = new Point(); // Upper Right Cornor Of Overlay Image
$upperRightCornor->setLatLng("Pakistan");

$bottomLeftCornor = new Point(); // Bottom Left Cornor Of image
$bottomLeftCornor->setLatLng("India");

$imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
$popupContent = "<h3>Image Overlay Content here</h3>";

$imageOverlay1 = new ImageOverlay($name, $upperRightCornor, $bottomLeftCornor, $imageUrl, $popupContent); // Create the overlay

$map->addImageOverlay($imageOverlay1); // Add as many overlays as you want

//$map->dropAllImageOverlays(); // If you want to delete all image overlays
/* End Map options */



/* Create First Marker */
$marker1 = new Marker(48.856614, 2.3522219000000177); // One Way - provide Latitude/Longitude directly
/* Properties */
$marker1->location = "Paris, France";
$marker1->description = "<p>This is where you can write the <strong>HTML</strong> code too</p>";
/* Advance Properties */
$marker1->showGetDirection    = false;
$marker1->showInfoBox         = false;
$marker1->showLocationOnPopup = true;
$marker1->hideLabel           = true;
/* Styling */
$marker1->markerStyle         = ""; // Default NONE, available options are (user,cog,leaf,home,.....) 
									// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
$marker1->markerColor         = ""; // Default NONE, available options are 
									// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
									//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

/* Create Second Marker */
$marker2 = new Marker(); // Other Way,
try {
	/*
	 * set the Latitude/Longitude by providing the Address.
	 * Throws Exception if the Latitude/Longitude is incorrect
	 */
	$marker2->setLatLng("Germany");
} catch (Exception $e) {
	// Handle the Exception Here
	echo $e->getMessage();
}

/* Properties */
//$marker2->location = "Germany"; // Here Default location is Set as 
										// "Paris, France". but you can still change it to your desired. 
										// Just uncomment the link and Set the Value
$marker2->description = "<p>This is where you can write the <strong>HTML</strong> code too</p>";
/* Advance Properties */
$marker2->showGetDirection    = false;
$marker2->showInfoBox         = true;
$marker2->showLocationOnPopup = true;
$marker2->hideLabel           = true;
/* Styling */
$marker2->markerStyle         = "home"; // Default NONE, available options are (user,cog,leaf,home,.....) 
									// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
$marker2->markerColor         = "red"; // Default NONE, available options are 
									// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
									//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

/* Add Markers to the Map */
$map->addShape($marker1);
$map->addShape($marker2);


// Save the map and get the MapID if successfully saved
$response = "";
try {
	$response = $api->save($map);
} catch (Exception $e) {
	// Handle the Exception Here
	echo $e->getMessage();
}
// TODO with Response.
echo $response;


var api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

var mapName = "My Map";
var mapHeight = 450;
var mapWidth = 950;
var mapZoom = 4;
var mapCenter = new Point(48.856614, 2.3522219); // Latitude, Longitude

var map = new Map(mapName, mapHeight, mapWidth, mapZoom, mapCenter);

map.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
map.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
map.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
map.setUseCluster(false);  // Default false
map.setOverlayEnable(false);  // Default false
map.setOverlayTitle("");  // Default NONE
map.setOverlayContent("");  // Default NONE
map.setOverlayBlurb("");  // Default NONE
map.setLegendEnable(false);  // Default false
map.setLegendContent("HTML content here");  // Default NONE
map.setProjectId(0);	// Default 0 or change it to the account owner's project ID
map.setShowSidebar(true);  // Default true
map.setShowExport(false);  // Default false
map.setShowMeasure(false);  // Default false
map.setShowMinimap(false);  // Default false
map.setShowSearch(false);  // Default false
map.setShowFilelayer(false);  // Default false // shows local file upload button
map.setShowSvg(false);  // Default false
map.setShowStaticSidebar(false);  // Default false
map.setStaticSidebarContent("");  // Default NONE

/* Add Image Overlay */
var name = "Overlay Title goes here"; // will not be displayed

var upperRightCornor = new Point(0.0, 0.0); // Upper Right Cornor Of Overlay Image
try {
	upperRightCornor.setLatLng("Canada");
} catch (e) {
	console.log(JSON.stringify(e));
}

var bottomLeftCornor = new Point(0.0, 0.0); // Bottom Left Cornor Of image
try {
	bottomLeftCornor.setLatLng("United State Of America");
} catch (e) {
	console.log(JSON.stringify(e));
}

var imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
var popupContent = "<h3>Image Overlay Content here</h3>";

var imageOverlay1 = new ImageOverlay(name, upperRightCornor, bottomLeftCornor, imageUrl, popupContent); // Create the overlay

map.addImageOverlay(imageOverlay1); // Add as many overlays as you want

//map.dropAllImageOverlays(); // If you want to delete all image overlays
/* End Map options */

/*Marker 1*/
var marker1 = null;
try {
	marker1 = new Marker(48.856614, 2.3522219000000177);
}catch(e) {
	console.log(JSON.stringify(e));
}

marker1.setLocation("Paris, France");
marker1.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker1.setShowGetDirection(false);
marker1.setShowInfoBox(false);
marker1.setShowLocationOnPopup(true);
marker1.setHideLabel(true);
/* Styling */
marker1.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....) 
									// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker1.setMarkerColor(""); // Default NONE, available options are 
									// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
									//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

/*Marker 2*/
var marker2 = null;
try {
	marker2 = new Marker();
}catch(e) {
	console.log(JSON.stringify(e));
}
try {
	/*
	 * set the Latitude/Longitude by providing the Address.
	 * Throws Exception if the Latitude/Longitude is incorrect
	 */
	 /*It has to be async. hence callback*/
	marker2.setLatLng("Germany", function() {
		marker2.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
		/* Advance Properties */
		marker2.setShowGetDirection(false);
		marker2.setShowInfoBox(false);
		marker2.setShowLocationOnPopup(true);
		marker2.setHideLabel(true);
		/* Styling */
		marker2.setMarkerStyle("home"); // Default NONE, available options are (user,cog,leaf,home,.....) 
											// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
		marker2.setMarkerColor("red"); // Default NONE, available options are 
											// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
											//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)

		/* Add Markers to the Map */
		map.addShape(marker1);
		map.addShape(marker2);


		/*Save the map*/
		/*Node JS is asynchronous. Hence callback*/
		try {
			api.save(map, function(response) {
				console.log(response);
			});
		}catch(e) {
			console.log(JSON.stringify(e));
		}
	});
} catch (e) {
	// Handle the Exception Here
	console.log(JSON.stringify(e));
}


MapFigApplication api = new MapFigApplication("https://studio.mapfig.com", "Za40iR62wtzc8HWs4TgJhNSI8_wRcqMa");

String mapName = "My Map";
int mapHeight = 450;
int mapWidth = 950;
int mapZoom = 4;
Point mapCenter = new Point(48.856614, 2.3522219); // Latitude, Longitude
/*
	* -- Alternative Way --
	* Point p = new Point();
	*	try {
	*		 *
	*		 * get the Latitude/Longitude in array by providing the Address.
	*		 * Throws Exception if the Address is incorrect
	*		 *
	*		mapCenter = p.setLatLng("United States of America"); // Sets the Point(Lat,Lng)
	*	} catch (Exception e) {
	*		// Handle the Exception Here
	*		echo e.Message;
	*	}
	*/
Map map = new Map(mapName, mapHeight, mapWidth, mapZoom, mapCenter);

/* These are not required unless you want to change something. 
	* the Default value is set weather or not you write them here.
	*/
map.setLayerId(1);  // Default 1 or change it to the account owner's layer ID
map.setGroupId(0);  // Default 0 or change it to the account owner's layer group ID
map.setPassword("");  // Default NONE or change it to the Desire Password to protact the Map
map.setUseCluster(false);  // Default false
map.setOverlayEnable(false);  // Default false
map.setOverlayTitle("");  // Default NONE
map.setOverlayContent("");  // Default NONE
map.setOverlayBlurb("");  // Default NONE
map.setLegendEnable(false);  // Default false
map.setLegendContent("HTML content here");  // Default NONE
map.setProjectId(0);	// Default 0 or change it to the account owner's project ID
map.setShowSidebar(true);  // Default true
map.setShowExport(false);  // Default false
map.setShowMeasure(false);  // Default false
map.setShowMinimap(false);  // Default false
map.setShowSearch(false);  // Default false
map.setShowFilelayer(false);  // Default false // shows local file upload button
map.setShowSvg(false);  // Default false
map.setShowStaticSidebar(false);  // Default false
map.setStaticSidebarContent("");  // Default NONE
/* End Map options */


/* Add Image Overlay */
String name = "Overlay Title goes here"; // will not be displayed

Point upperRightCornor = new Point(0.0, 0.0); // Upper Right Cornor Of Overlay Image
try
{
	upperRightCornor.setLatLng("Canada");
}
catch (Exception e2)
{
	// TODO Auto-generated catch block
}

Point bottomLeftCornor = new Point(0.0, 0.0); // Bottom Left Cornor Of image
try
{
	bottomLeftCornor.setLatLng("United State Of America");
}
catch (Exception e2)
{
	// TODO Auto-generated catch block
}

String imageUrl = "http://www.YOUR_IMAGE_URL.com/PATH.JPG";
String popupContent = "<h3>Image Overlay Content here</h3>";

ImageOverlay imageOverlay1 = new ImageOverlay(name, upperRightCornor, bottomLeftCornor, imageUrl, popupContent); // Create the overlay

map.addImageOverlay(imageOverlay1); // Add as many overlays as you want

//map.dropAllImageOverlays(); // If you want to delete all image overlays
/* End Map options */

/* Create First Marker */
Marker marker1 = new Marker(48.856614, 2.3522219000000177); // One Way - provide Latitude/Longitude directly
/* Properties */
try
{
	marker1.setLocation("Paris, France");
}
catch (Exception e)
{
	Console.WriteLine(e.Message);
}
marker1.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker1.setShowGetDirection(false);
marker1.setShowInfoBox(false);
marker1.setShowLocationOnPopup(true);
marker1.setHideLabel(true);
/* Styling */
marker1.setMarkerStyle(""); // Default NONE, available options are (user,cog,leaf,home,.....) 
// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker1.setMarkerColor(""); // Default NONE, available options are 
// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)


/* Create Second Marker */
Marker marker2 = new Marker();

try
{
	/*
		* set the Latitude/Longitude by providing the Address.
		* Throws Exception if the Latitude/Longitude is incorrect
		*/
	marker2.setLatLng("Germany");
}
catch (Exception e)
{
	// Handle the Exception Here
	Console.WriteLine(e.Message);
}

/* Properties */
//marker2.location = "Germany"; // Here Default location is Set as 
// "Paris, France". but you can still change it to your desired. 
// Just uncomment the link and Set the Value
marker2.setDescription("<p>This is where you can write the <strong>HTML</strong> code too</p>");
/* Advance Properties */
marker2.setShowGetDirection(false);
marker2.setShowInfoBox(false);
marker2.setShowLocationOnPopup(true);
marker2.setHideLabel(true);
/* Styling */
marker2.setMarkerStyle("home"); // Default NONE, available options are (user,cog,leaf,home,.....) 
// Complete list can be found here http://fortawesome.github.io/Font-Awesome/icons/
marker2.setMarkerColor("red"); // Default NONE, available options are 
// (Red,Blue,Green,Purple,Orange,Darkred,Lightred,Beige,Darkblue,Darkpurple,White,
//  Pink,Lightblue,Lightgreen,Gray,Black,cadetblue,Brown,Lightgray)


/* Add Markers to the Map */
map.addShape(marker1);
map.addShape(marker2);

// Save the map and get the MapID if successfully saved
String response = "";

try
{
	response = api.save(map);
}
catch (Exception e)
{
	Console.WriteLine(e.Message);
}

// TODO with Response.
Console.WriteLine(response);

Errors

Errors and exceptions are being handled in the code. You can use the e.getMessage method for the respective programing language to get the Exception Message.