GeoSpatial Service

This module offers a complete set of APIs for Geospatial Service on cloud including storage, retrieval, query and updating of geographical data. You can store geographical data with unique handler on the cloud and search, update and query on the same. Geo spatial query includes locating nearby/in-circle target points from giving location using Geo points stored on the cloud.

Import Statement

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
import com.shephertz.app42.paas.sdk.android.App42API;
import com.shephertz.app42.paas.sdk.android.App42Response;
import com.shephertz.app42.paas.sdk.android.App42Exception;
import com.shephertz.app42.paas.sdk.android.App42BadParameterException;
import com.shephertz.app42.paas.sdk.android.App42NotFoundException;
import com.shephertz.app42.paas.sdk.android.geo.Geo;
import com.shephertz.app42.paas.sdk.android.geo.GeoService;
using com.shephertz.app42.paas.sdk.windows;  
using com.shephertz.app42.paas.sdk.windows.geo;   
#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
import com.shephertz.app42.paas.sdk.jme.App42API;
import com.shephertz.app42.paas.sdk.jme.App42Response;
import com.shephertz.app42.paas.sdk.jme.App42Exception;
import com.shephertz.app42.paas.sdk.jme.App42BadParameterException;
import com.shephertz.app42.paas.sdk.jme.App42NotFoundException;
import com.shephertz.app42.paas.sdk.jme.geo.Geo;
import com.shephertz.app42.paas.sdk.jme.geo.GeoService;
import com.shephertz.app42.paas.sdk.java.App42API;
import com.shephertz.app42.paas.sdk.java.App42Response;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42NotFoundException;
import com.shephertz.app42.paas.sdk.java.geo.Geo;
import com.shephertz.app42.paas.sdk.java.geo.GeoService;
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.geo;  
<script type="text/javascript" src="App42-all-x.x.x.min.js"></script>
Coming Soon
Coming Soon
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.geo;  
include_once '../GeoService.php';
include_once '../GeoPoint.php';
include_once '../App42Response.php';
include_once '../App42Exception.php';
include_once '../App42BadParameterException.php';
include_once '../App42NotFoundException.php';
include_once '../App42Log.php';  
Coming Soon
require 'App42_Ruby_API'
import com.shephertz.app42.paas.sdk.as3.App42CallBack;
import com.shephertz.app42.paas.sdk.as3.App42API;
import com.shephertz.app42.paas.sdk.as3.App42Response;
import com.shephertz.app42.paas.sdk.as3.App42Exception;
import com.shephertz.app42.paas.sdk.as3.App42BadParameterException;
import com.shephertz.app42.paas.sdk.as3.App42NotFoundException;
import com.shephertz.app42.paas.sdk.as3.geo.Geo;
import com.shephertz.app42.paas.sdk.as3.geo.GeoPoint;
import com.shephertz.app42.paas.sdk.as3.geo.GeoService; 
Coming Soon
coming soon

Initialize

In order to use various the functions available in a specific API, a developer has to initialize with App42API by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.

Required Parameters

apiKey - The Application key given when the application was created. secretKey - The secret key corresponding to the application key given when the application was created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
App42API.initialize("API_KEY","SECRET_KEY");
App42API.initialize("API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
App42.initialize("API_KEY","SECRET_KEY");
Coming Soon
Coming Soon
App42API.Initialize("API_KEY","SECRET_KEY");
App42API::initialize("API_KEY","SECRET_KEY");
Coming Soon
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
App42API.initialize("API_KEY","SECRET_KEY");
Coming Soon
coming soon

Build Service

After initialization, developer needs to call the buildXXXService method on App42API to get the instance of the particular API that you wish to build. For example, To build an instance of GeoService, buildGeoService() method needs to be called.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
GeoService geoService = App42API.buildGeoService(); 
	
GeoService *geoService = [App42API buildGeoService]; 
GeoService geoService = App42API.buildGeoService(); 
GeoService geoService = App42API.buildGeoService(); 
GeoService geoService = App42API.BuildGeoService(); 
var geoService  = new App42Geo();
Coming Soon
Coming Soon
GeoService geoService = App42API.BuildGeoService(); 
$geoService = App42API::buildGeoService();
Coming Soon
geo_service = api.build_geo_service()  
var geoService:GeoService = App42API.buildGeoService(); 
Coming Soon
coming soon

Create Geo Points

Stores the Geo points with unique handler on the cloud. Geo point data contains lat, lng and marker of the point.

Required Parameters

storageName - Unique handler for storage name. geoPointsList - List of Geo Points to be saved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
ArrayList<GeoPoint> geoPointsList = new ArrayList<GeoPoint>();        			
GeoPoint gp = new GeoPoint();
gp.setMarker("Maplewood, NJ");
gp.setLat(new BigDecimal(-74.2713));
gp.setLng(new BigDecimal(40.73137));
geoPointsList.add(gp);
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.createGeoPoints(storageName, geoPointsList, new App42CallBack() {
public void onSuccess(Object response) 
{
	Geo geo = (Geo)response;
	System.out.println("Storage Name is : "+geo.getStorageName());
	for(int i=0;i<geo.getPointList().size();i++)
	{
		System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
		System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
		System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String storageName = "<Your_storage_name>";
IList<GeoPoint> geoPointsList = new List<GeoPoint>();					
GeoPoint gp = new GeoPoint();
gp.SetMarker("Maplewood, NJ");
gp.SetLat(-74.2713);
gp.SetLng(40.73137);
geoPointsList.Add(gp);
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.CreateGeoPoints(storageName,geoPointsList,new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Geo geo = (Geo) response;     
		Console.WriteLine("storageName is " + geo.GetStorageName()); 
		Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
		String jsonResponse = geo.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	} 
}
NSString *storageName = @"<Your_storage_name>";
NSMutableArray *geoPointsList = [[NSMutableArray alloc]init];					
GeoPoint *gp = [[GeoPoint alloc]init];
gp.marker = @"Maplewood,NJ";
gp.latitude = -74.2713;
gp.longitude = 40.73137;
[geoPointsList addObject:gp];
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService createGeoPoints:storageName geoPointsList:geoPointsList completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Geo *geo = (Geo*)responseObj;
		NSLog(@"storageName is %@", geo.storageName);
		for(Points *point in geo.pointList)
		{
			NSLog(@"latitude is %f", point.lat);
			NSLog(@"longitude is %f", point.lng);
			NSLog(@"marker is %@", point.marker);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
String storageName = "<Your_storage_name>";
Vector geoPointsList = new Vector();					
GeoPoint gp = new GeoPoint();
gp.setMarker("Maplewood, NJ");
gp.setLat(new Double(-74.2713));
gp.setLng(new Double(40.73137));
geoPointsList.addElement(gp);
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.createGeoPoints(storageName,geoPointsList);
System.out.println("storageName is " + geo.getStorageName();
String jsonResponse = geo.toString(); 
String storageName = "<Your_storage_name>";
ArrayList<GeoPoint> geoPointsList = new ArrayList<GeoPoint>();					
GeoPoint gp = new GeoPoint();
gp.setMarker("Maplewood, NJ");
gp.setLat(new BigDecimal(-74.2713));
gp.setLng(new BigDecimal(40.73137));
geoPointsList.add(gp);
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.createGeoPoints(storageName,geoPointsList);
System.out.println("Storage Name is : "+geo.getStorageName());
for(int i=0;i<geo.getPointList().size();i++)
{
	System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
	System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
	System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
}
String jsonResponse = geo.toString();     
String storageName = "<Your_storage_name>";
IList<GeoPoint> geoPointsList = new List<GeoPoint>();    				
GeoPoint gp = new GeoPoint();
gp.SetMarker("Maplewood, NJ");
gp.SetLat(-74.2713);
gp.SetLng(40.73137);
geoPointsList.Add(gp);
App42Log.SetDebug(true);    	//Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.CreateGeoPoints(storageName, geoPointsList, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Geo geo = (Geo) response;   
		App42Log.Console("storageName is :" + geo.GetStorageName());
    	App42Log.Console("Lat is : " + geo.GetPointList()[0].GetLat());
    	App42Log.Console("Lng is : " + geo.GetPointList()[0].GetLng());
    	App42Log.Console("Marker is : " + geo.GetPointList()[0].GetMarker());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var geoPointsList = new Array();
var point =
{
	lat:-74.2713,
	lng:40.73137,
	marker: "Maplewood, NJ"
};
geoPointsList.push(point);
var storageName = "<Your_storage_name>",
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.createGeoPoints(storageName,geoPointsList,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response.geo.storage;
		console.log("result is " + result.storageName)
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
IList<GeoPoint> geoPointsList = new List<GeoPoint>();					
GeoPoint gp = new GeoPoint();
gp.SetMarker("Maplewood, NJ");
gp.SetLat(-74.2713);
gp.SetLng(40.73137);
geoPointsList.Add(gp);
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
Geo geo = geoService.CreateGeoPoints(storageName,geoPointsList); 
Console.WriteLine("storageName is " + geo.GetStorageName()); 
Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
String jsonResponse = geo.ToString();
$storageName = "<Your_storage_name>";
$geoPointsList = array();					
$gp = new GeoPoint();
$gp->setMarker("Maplewood, NJ");
$gp->setLat(-74.2713);
$gp->setLng(40.73137);
array_push($geoPointsList, $gp);
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->createGeoPoints($storageName,$geoPointsList);
print_r("storageName is " . $geo->getStorageName());
$pointList = $geo->getPointList();
foreach ($pointList as $points) 
{
	print_r("sourceLat in point is : " . $points->getLat());
	print_r("sourceLng in point is : " . $points->getLng());
	print_r("sourceMarker in point is : " . $points->getMarker());
}
$jsonResponse = $geo->toString(); 
Coming Soon
storageName = "<Your_storage_name>";
geoPointsList = Array.new();
gp = App42::Geo::GeoPoint.new();
gp.lat = "-74.2713";
gp.lng = "40.73137";
gp.marker = "Maplewood, NJ";
geoPointsList.push(gp);						
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
geo_service = api.build_geo_service()  
geo = geo_service.create_geo_points(storageName, geoPointsList);
puts "storageName is #{geo.get_storage_name}";
point_list = Array.new();
point_list = geo.point_list();
for point in point_list do
  puts "lat is #{point.lat}";
  puts "lng is #{point.lng}";
  puts "marker is #{point.marker}";
end
json_response = geo.to_s();
var storageName:String = "<Your_storage_name>"; 
var geoPoint:GeoPoint = new GeoPoint();
geoPoint.setLat(73);
geoPoint.setLng(40);
geoPoint.setMarker("Maplewood");
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
var geoPoint1:GeoPoint = new GeoPoint();
geoPoint1.setLat(73.4);
geoPoint1.setLng(42);
geoPoint1.setMarker("Nz");

var geoPointsList:Array = new Array();
geoPointsList.push(geoPoint);
geoPointsList.push(geoPoint1);
geoService.createGeoPoints(storageName, geoPointsList,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		var geo:Geo = Geo(response);
		trace("storageName is : "+geo.getStorageName());
		if(geo.getPointList().length > 0)
		{
			for(var j:int=0;j<geo.getPointList().length;j++)
			{
				trace("sourceLat in point is : "+ GeoPoint(geo.getPointList()[j]).getLat());
				trace("sourceLng in point is : "+ GeoPoint(geo.getPointList()[j]).getLng());
				trace("sourceMarker in point is : "+ GeoPoint(geo.getPointList()[j]).getMarker());			
			}
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
}
Coming Soon 
coming soon

Get All Points

Get All Points from storage.

Required Parameters

storageName - Name of the storage from which points have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.getAllPoints(storageName,new App42CallBack() {
public void onSuccess(Object response) 
{			
	ArrayList<Geo> geo = (ArrayList<Geo>)response;
	System.out.println(geo);
	for(int i = 0;i<geo.size();i++ )
	{
		System.out.println("Storage Name is : "+geo.get(i).getStorageName());
		ArrayList<Geo.Point> pointList = geo.get(i).getPointList();
		for(int j=0;j<pointList.size();j++)
		{
			System.out.println("sourceLat in point is : "+ pointList.get(j).getLat());
			System.out.println("sourceLng in point is : "+pointList.get(j).getLng());
			System.out.println("sourceMarker in point is : "+pointList.get(j).getMarker());	
		}
	}
}
public void onException(Exception ex)
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String storageName = "<Your_storage_name>";
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.GetAllPoints(storageName,new Callback()); 
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		IList<Geo> geo = (List<Geo>) response;
		for(int i = 0; i < geo.Count; i++)
		{
			Console.WriteLine("Storage Name is : " + geo[i].GetStorageName());
			IList<Geo.Point> pointList = geo[i].GetPointList();
			for(int j=0; j < pointList.Count; j++)
			{
				Console.WriteLine("SourceLat in point is : " + pointList[j].GetLat());
				Console.WriteLine("SourceLng in point is : " + pointList[j].GetLng());
				Console.WriteLine("SourceMarker in point is : " + pointList[j].GetMarker());	
			}
		}	
		String jsonResponse = geo.ToString();  
	}   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	}  
}
NSString *storageName = @"<Your_storage_name>";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService getAllPoints:storageName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		NSArray *geoList = (NSArray*)responseObj;
		for(Geo *geo in geoList){
			NSLog(@"storageName is %@", geo.storageName);
			for(Points *point in geo.pointList)
			{
				NSLog(@"latitude is %f", point.lat);
				NSLog(@"longitude is %f", point.lng);
				NSLog(@"marker is %@", point.marker);
			}
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
String storageName = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.getAllPoints(storageName);
System.out.println("storageName is " + geo.getStorageName();
String jsonResponse = geo.toString(); 
String storageName = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
ArrayList<Geo> geo = geoService.getAllPoints(storageName);
System.out.println(geo);
for(int i = 0;i<geo.size();i++ )
{
	System.out.println("Storage Name is : "+geo.get(i).getStorageName());
	ArrayList<Geo.Point> pointList = geo.get(i).getPointList();
	for(int j=0;j<pointList.size();j++)
	{
		System.out.println("sourceLat in point is : "+ pointList.get(j).getLat());
		System.out.println("sourceLng in point is : "+pointList.get(j).getLng());
		System.out.println("sourceMarker in point is : "+pointList.get(j).getMarker());	
	}
}
String jsonResponse = geo.toString();     
String storageName = "<Your_storage_name>";
App42Log.SetDebug(true);    	//Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.GetAllPoints(storageName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Geo geo = (Geo) response;   
		App42Log.Console("storageName is :" + geo.GetStorageName());
    	App42Log.Console("Lat is : " + geo.GetPointList()[0].GetLat());
    	App42Log.Console("Lng is : " + geo.GetPointList()[0].GetLng());
    	App42Log.Console("Marker is : " + geo.GetPointList()[0].GetMarker());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var storageName = "<Your_storage_name>",
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.getAllPoints(storageName,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response.geo.storage;
		console.log("result is " + result.storageName)
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
Geo geo = geoService.GetAllPoints(storageName); 
Console.WriteLine("storageName is " + geo.GetStorageName()); 
Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
String jsonResponse = geo.ToString();
$storageName = "<Your_storage_name>";
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->getAllPoints($storageName);
print_r("storageName is " . $geo->getStorageName());
$pointList = $geo->getPointList();
foreach ($pointList as $points) 
{
	print_r("sourceLat in point is : " . $points->getLat());
	print_r("sourceLng in point is : " . $points->getLng());
	print_r("sourceMarker in point is : " . $points->getMarker());
}
$jsonResponse = $geo->toString(); 
Coming Soon
storageName = "<Your_storage_name>";					
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
geo_service = api.build_geo_service()  
puts "storageName is #{geo.get_storage_name}";
point_list = Array.new();
point_list = geo.point_list();
for point in point_list do
  puts "lat is #{point.lat}";
  puts "lng is #{point.lng}";
  puts "marker is #{point.marker}";
end
json_response = geo.to_s();
var storageName:String = "<Your_storage_name>"; 
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.getAllPoints(storageName,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		for(var i:int = 0;i < response.length;i++)
		{
			var geo:Geo = Geo(response[i]);
			trace("storageName is : "+geo.getStorageName());
			if(geo.getPointList().length > 0)
			{
				for(var j:int=0;j<geo.getPointList().length;j++)
				{
					trace("sourceLat in point is : "+ GeoPoint(geo.getPointList()[j]).getLat());
					trace("sourceLng in point is : "+ GeoPoint(geo.getPointList()[j]).getLng());
					trace("sourceMarker in point is : "+ GeoPoint(geo.getPointList()[j]).getMarker());			
				}
			}
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
} 
Coming Soon 
coming soon

Get All Points By Paging

Get All Points from storage by paging.

Required Parameters

storageName - Name of the storage from which points have to be fetched. max - Maximum number of records to be fetched. offset - From where the records are to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
int max = 1;
int offset = 0;
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.getAllPointsByPaging(storageName, max, offset, new App42CallBack() {
public void onSuccess(Object response) 
{			
	ArrayList<Geo> geo = (ArrayList<Geo>)response;
	for(int i = 0;i<geo.size();i++ )
	{
		System.out.println("Storage Name is : "+geo.get(i).getStorageName());
		ArrayList<Geo.Point> pointList = geo.get(i).getPointList();
		for(int j=0;j<pointList.size();j++)
		{
			System.out.println("sourceLat in point is : "+ pointList.get(j).getLat());
			System.out.println("sourceLng in point is : "+pointList.get(j).getLng());
			System.out.println("sourceMarker in point is : "+pointList.get(j).getMarker());	
		}
	}
}
public void onException(Exception ex)
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
String storageName = "<Your_storage_name>";
int max = 1;
int offset = 0;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.GetAllPointsByPaging(storageName, max, offset,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		IList<Geo> geo = (List<Geo>) response;
		for(int i = 0; i < geo.Count; i++)
		{
			Console.WriteLine("Storage Name is : " + geo[i].GetStorageName());
			IList<Geo.Point> pointList = geo[i].GetPointList();
			for(int j=0; j < pointList.Count; j++)
			{
				Console.WriteLine("SourceLat in point is : " + pointList[j].GetLat());
				Console.WriteLine("SourceLng in point is : " + pointList[j].GetLng());
				Console.WriteLine("SourceMarker in point is : " + pointList[j].GetMarker());	
			}
		}	
		String jsonResponse = geo.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	}  
}
NSString *storageName = @"<Your_storage_name>";
int max = 1;
int offset = 0;
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService getAllPointsByPaging:storageName max:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Geo *geo = (Geo*)responseObj;
		NSLog(@"storageName is %@", geo.storageName);
		for(Points *point in geo.pointList)
		{
			NSLog(@"latitude is %f", point.lat);
			NSLog(@"longitude is %f", point.lng);
			NSLog(@"marker is %@", point.marker);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
Coming Soon 
String storageName = "<Your_storage_name>";
int max = 1;
int offset = 0;
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
ArrayList<Geo> geo =  geoService.getAllPoints(storageName, max, offset);
for(int i = 0;i<geo.size();i++ )
{
	System.out.println("Storage Name is : "+geo.get(i).getStorageName());
	ArrayList<Geo.Point> pointList = geo.get(i).getPointList();
	for(int j=0;j<pointList.size();j++)
	{
		System.out.println("sourceLat in point is : "+ pointList.get(j).getLat());
		System.out.println("sourceLng in point is : "+pointList.get(j).getLng());
		System.out.println("sourceMarker in point is : "+pointList.get(j).getMarker());	
	}
}
String jsonResponse = geo.toString();     
String storageName = "<Your_storage_name>";
int max = 1;
int offset = 0;
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.GetAllPoints(storageName, max, offset, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Geo geo = (Geo) response;   
		App42Log.Console("storageName is :" + geo.GetStorageName());
    	App42Log.Console("Lat is : " + geo.GetPointList()[0].GetLat());
    	App42Log.Console("Lng is : " + geo.GetPointList()[0].GetLng());
    	App42Log.Console("Marker is : " + geo.GetPointList()[0].GetMarker());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Coming Soon 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
int max = 1;
int offset = 0;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
Geo geo = geoService.GetAllPoints(storageName,max,offset); 
Console.WriteLine("storageName is " + geo.GetStorageName()); 
Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
String jsonResponse = geo.ToString();
$storageName = "<Your_storage_name>";
max = 1;
offset = 0;
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->getAllPoints($storageName,$max,$offset);
print_r("storageName is " . $geo->getStorageName() . PHP_EOL);
$pointList = $geo->getPointList();
foreach ($pointList as $points) 
{
	print_r("sourceLat in point is : " . $points->getLat() . PHP_EOL);
	print_r("sourceLng in point is : " . $points->getLng() . PHP_EOL);
	print_r("sourceMarker in point is : " . $points->getMarker() . PHP_EOL);
}
$jsonResponse = $geo->toString(); 
Coming Soon
Coming Soon
var storageName:String = "<Your_storage_name>"; 
var max:int = 1;  
var offset:int = 0;  
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.getAllPointsByPaging(storageName , max, offset,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		for(var i:int = 0;i < response.length;i++)
		{
			var geo:Geo = Geo(response[i]);
			trace("storageName is : "+geo.getStorageName());
			if(geo.getPointList().length > 0)
			{
				for(var j:int=0;j<geo.getPointList().length;j++)
				{
					trace("sourceLat in point is : "+ GeoPoint(geo.getPointList()[j]).getLat());
					trace("sourceLng in point is : "+ GeoPoint(geo.getPointList()[j]).getLng());
					trace("sourceMarker in point is : "+ GeoPoint(geo.getPointList()[j]).getMarker());			
				}
			}
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
} 
Coming Soon 
coming soon

Get All Storage

Fetch the name of all storage stored on the cloud.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.getAllStorage(new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Geo> geo = (ArrayList<Geo>)response;
	System.out.println(geo);
	for(int i = 0;i<geo.size();i++ )
	{
		System.out.println("Storage Name is : "+geo.get(i).getStorageName());
		System.out.println("Created On is : "+geo.get(i).getCreatedOn());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.GetAllStorage(new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		IList<Geo> geo = (IList<Geo>) response;     
		Console.WriteLine("storageName is " + geo[0].GetStorageName());
		Console.WriteLine("createdOn is " + geo[0].GetCreatedOn());
		String jsonResponse = geo[0].ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	} 
}  
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService getAllStorage:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		NSArray *geoList = (NSArray*)responseObj;
		for(Geo *geo in geoList){
			NSLog(@"storageName is %@", geo.storageName);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Vector geo = geoService.getAllStorage(); 
System.out.println("storageName is " + ((Geo)geo.elementAt(0)).getStorageName());
System.out.println("createdOn is " + ((Geo)geo.elementAt(0)).getCreatedOn());
String jsonResponse = ((Geo)geo.elementAt(0)).toString(); 
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
ArrayList<Geo> geo = geoService.getAllStorage(); 
System.out.println(geo);
for(int i = 0;i<geo.size();i++ )
{
	System.out.println("Storage Name is : "+geo.get(i).getStorageName());
	System.out.println("Created On is : "+geo.get(i).getCreatedOn());
}
String jsonResponse = geo.get(0).toString();  
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.GetAllStorage(new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
	{
		IList<Geo> geo = (IList<Geo>) response;   
		App42Log.Console("storageName is :" + geo[0].GetStorageName());
    	App42Log.Console("createdOn is " + geo[0].GetCreatedOn());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.getAllStorage({  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response.geo;
		console.log("result is " + result)
	},  
	error: function(error) {  
	}  
});     
Coming Soon
Coming Soon
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
IList<Geo> geo = geoService.GetAllStorage(); 
Console.WriteLine("storageName is " + geo[0].GetStorageName());
Console.WriteLine("createdOn is " + geo[0].GetCreatedOn());
String jsonResponse = geo[0].ToString(); 
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->getAllStorage(); 
foreach ($geo as $list)
{
	print_r("Storage Name is : ".$list->getStorageName());
	print_r("Created On is : ".$list->getCreatedOn());
}
$jsonResponse = $geo[0]->toString(); 
Coming Soon
geo_list = Array.new();
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
geo_service = api.build_geo_service()  
geo_list = geo_service.get_all_storage();
for geo in geo_list do
  puts "storageName is #{geo.get_storageName}";
end
json_response = geo_list.to_s();
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.getAllStorage(new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		for(var i:int = 0;i < response.length;i++)
		{
			var geo:Geo = Geo(response[i]);
			trace("storageName is : "+geo.getStorageName());
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
} 
Coming Soon
coming soon

Get All Storage By Paging

Fetch the name of all storage stored on the cloud by paging.

max - Maximum number of records to be fetched. offset - From where the records are to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
int max = 1;
int offset = 0;
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.getAllStorageByPaging(max, offset,new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Geo> geo = (ArrayList<Geo>)response;
	System.out.println(geo);
	for(int i = 0;i<geo.size();i++ )
	{
		System.out.println("Storage Name is : "+geo.get(i).getStorageName());
		System.out.println("Created On is : "+geo.get(i).getCreatedOn());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
int max = 1;
int offset = 0;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.GetAllStorage(max,offset,new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		IList<Geo> geo = (IList<Geo>) response;     
		Console.WriteLine("storageName is " + geo[0].GetStorageName());
		Console.WriteLine("createdOn is " + geo[0].GetCreatedOn());
		String jsonResponse = geo[0].ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	} 
}
int max = 1;
int offset = 0 ;
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService getAllStorageByPaging:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		NSArray *geoList = (NSArray*)responseObj;
		for(Geo *geo in geoList){
			NSLog(@"storageName is %@", geo.storageName);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
Coming Soon 
int max = 1;
int offset = 0;
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
ArrayList<Geo> geo = geoService.getAllStorageByPaging(max,offset); 
System.out.println(geo);
for(int i = 0;i<geo.size();i++ )
{
	System.out.println("Storage Name is : "+geo.get(i).getStorageName());
	System.out.println("Created On is : "+geo.get(i).getCreatedOn());
}
String jsonResponse = geo.get(0).toString();  
int max = 1;
int offset = 0;
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.GetAllStorageByPaging(max, offset, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
		IList<Geo> geo = (IList<Geo>) response;   
		App42Log.Console("storageName is :" + geo[0].GetStorageName());
    	App42Log.Console("createdOn is " + geo[0].GetCreatedOn());
        App42Log.Console("jsonResponse is " + geo[0].ToString());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var max = 1,
offset = 0,
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.getAllStorageByPaging(max,offset,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response.geo;
		console.log("result is " + result)
	},  
	error: function(error) {  
	}  
});     
Coming Soon
Coming Soon
int max = 1;
int offset = 0;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
IList<Geo> geo = geoService.GetAllStorageByPaging(max,offset); 
Console.WriteLine("storageName is " + geo[0].GetStorageName());
Console.WriteLine("createdOn is " + geo[0].GetCreatedOn());
String jsonResponse = geo[0].ToString(); 
$max = 1;
$offset = 0;
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->getAllStorageByPaging($max,$offset); 
foreach ($geo as $list)
{
	print_r("Storage Name is : ".$list->getStorageName());
	print_r("Created On is : ".$list->getCreatedOn());
}
$jsonResponse = $geo[0]->toString(); 
Coming Soon
Coming Soon
var max:int = 1;  
var offset:int = 0;  
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.getAllStorageByPaging(max, offset,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		for(var i:int = 0;i < response.length;i++)
		{
			var geo:Geo = Geo(response[i]);
			trace("storageName is : "+geo.getStorageName());
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
}
Coming Soon
coming soon

Get Near By Point

Search the nearby point from the specified source point. Points to be searched should already be stored on the cloud using a unique storage name handler.

Required Parameters

storageName - Unique handler for storage name. lat - Latitude of source point. lng - Longitude of source point. resultLimit - Maximum number of results to be retrieved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868); 
int resultLimit	= 2;		 			
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.getNearByPoint(storageName, lat, lng , resultLimit, new App42CallBack() {
public void onSuccess(Object response) 
{
	Geo geo = (Geo)response;
	System.out.println("Storage Name is : "+geo.getStorageName());
	for(int i=0;i<geo.getPointList().size();i++)
	{
		System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
		System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
		System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String storageName = "<Your_storage_name>";
Double   lat = -73.99171;  
Double  lng = 40.738868; 
int resultLimit	= 2;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.GetNearByPoint(storageName,lat,lng,resultLimit,new Callback());  
public class Callback : App42Callback  
{
	public void OnSuccess(Object response)  
	{  
		Geo geo = (Geo) response;     
		Console.WriteLine("storageName is " + geo.GetStorageName()); 
		Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
		String jsonResponse = geo.ToString();  
	}    
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	}  
}
NSString *storageName = @"<Your_storage_name>";
double lat = -73.99171;  
double lng = 40.738868; 
int resultLimit	= 2;		 			
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService getNearByPoint:storageName latitude:lat longitude:lng resultLimit:resultLimit completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Geo *geo = (Geo*)responseObj;
		NSLog(@"storageName is %@", geo.storageName);
		for(Points *point in geo.pointList)
		{
			NSLog(@"latitude is %f", point.lat);
			NSLog(@"longitude is %f", point.lng);
			NSLog(@"marker is %@", point.marker);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868); 
int resultLimit	= 2;		 			
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.getNearByPoint(storageName,lat,lng,resultLimit);
System.out.println("storageName is " + geo.getStorageName();
String jsonResponse = geo.toString(); 
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868); 
int resultLimit	= 2;		 			
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.getNearByPoint(storageName,lat,lng,resultLimit);
System.out.println("Storage Name is : "+geo.getStorageName());
for(int i=0;i<geo.getPointList().size();i++)
{
	System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
	System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
	System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
}
String jsonResponse = geo.toString();     
String storageName = "<Your_storage_name>";
double   lat = -73.99171;  
double  lng = 40.738868; 
int resultLimit    = 2;	 			
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.GetNearByPoint(storageName,lat,lng,resultLimit, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	Geo geo = (Geo) response;   
		App42Log.Console("storageName is :" + geo.GetStorageName());
    	App42Log.Console("Lat is     : " + geo.GetPointList()[0].GetLat());
        App42Log.Console("Lng is     : " + geo.GetPointList()[0].GetLng());
        App42Log.Console("Marker is  : " + geo.GetPointList()[0].GetMarker());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var storageName = "<Your_storage_name>",
lat = -73.99171,  
lng = 40.738868, 
resultLimit	= 2,
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.getNearByPoint(storageName,lat,lng,resultLimit,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response.geo.storage;
		console.log("result is " + result.storageName)
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
Double   lat = -73.99171;  
Double  lng = 40.738868; 
int resultLimit	= 2;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
Geo geo = geoService.GetNearByPoint(storageName,lat,lng,resultLimit); 
Console.WriteLine("storageName is " + geo.GetStorageName()); 
Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
String jsonResponse = geo.ToString();
$storageName = "<Your_storage_name>";
$lat = -73.99171;
$lng = 40.738868; 
$resultLimit	= 2;
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->getNearByPoint($storageName,$lat,$lng,$resultLimit);
print_r("storageName is " . $geo->getStorageName());
print_r("sourceLat is " . $geo->getSourceLat());
print_r("sourceLng is " . $geo->getSourceLng());
$pointList = $geo->getPointList();
foreach ($pointList as $points) 
{
	print_r("sourceLat in point is : " . $points->getLat());
	print_r("sourceLng in point is : " . $points->getLng());
	print_r("sourceMarker in point is : " . $points->getMarker());
}
$jsonResponse = $geo->toString(); 
Coming Soon
storageName = "<Your_storage_name>";
lat = "-73.99171";  
lng = "40.738868"; 
resultLimit	= "2";						
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
geo_service = api.build_geo_service()  
geo = geo_service.get_near_by_point(storageName, lat, lng, resultLimit);
puts "storageName is #{geo.get_storage_name}";
puts "sourceLat is #{geo.source_lat}";
puts "distanceInKM is #{geo.distanceInKM}";
puts "sourceLng is #{geo.sourceLng}";
point_list = Array.new();
point_list = geo.point_list();
for point in point_list do
  puts "lat is #{point.lat}";
  puts "lng is #{point.lng}";
  puts "marker is #{point.marker}";
end
json_response = geo.to_s();
var storageName:String = "<Your_storage_name>"; 
var lat:Number =73;    
var lng:Number = 40;   
var resultLimit:int = 2;           
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.getNearByPoint( storageName , lat, lng, resultLimit,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		var geo:Geo = Geo(response);
		trace("storageName is : "+geo.getStorageName());
		trace("sourceLat is : "+geo.getSourceLat());
		trace("sourceLng is : "+geo.getSourceLng());
		trace("distanceInKM is : "+geo.getDistanceInKM());
		if(geo.getPointList().length > 0)
		{
			for(var j:int=0;j<geo.getPointList().length;j++)
			{
				trace("sourceLat in point is : "+ GeoPoint(geo.getPointList()[j]).getLat());
				trace("sourceLng in point is : "+ GeoPoint(geo.getPointList()[j]).getLng());
				trace("sourceMarker in point is : "+ GeoPoint(geo.getPointList()[j]).getMarker());			
			}
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
} 
Coming Soon 
coming soon

Get Points WithIn circle

Search the nearby point from specified source point with in specified radius(In KM). Points to be searched should already be stored on cloud using unique storage name handler.

Required Parameters

storageName - Unique handler for storage name. lat - Latitude of source point. lng - Longitude of source point. radiusInKM - Radius in KM. resultLimit - Maximum number of results to be retrieved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868);   
BigDecimal radiusInKM = new BigDecimal(1); 
int resultLimit	= 2;
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.getPointsWithInCircle(storageName,lat, lng, radiusInKM, resultLimit, new App42CallBack() {
public void onSuccess(Object response) 
{
	Geo geo = (Geo)response;
	System.out.println("Storage Name is : "+geo.getStorageName());
	for(int i=0;i<geo.getPointList().size();i++)
	{
		System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
		System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
		System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});		 			
String storageName = "<Your_storage_name>";
Double   lat = -73.99171;  
Double  lng = 40.738868; 
Double  radiusInKM = 1; 
int resultLimit	= 2;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.GetPointsWithInCircle(storageName,lat,lng,radiusInKM,resultLimit,new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Geo geo = (Geo) response;     
		Console.WriteLine("storageName is " + geo.GetStorageName()); 
		Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
		String jsonResponse = geo.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	} 
}
NSString *storageName = @"<Your_storage_name>";
double lat = -73.99171;  
double lng = 40.738868;  
double  radiusInKM = 1; 
int resultLimit	= 2;		 			
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService getPointsWithInCircle:storageName latitude:lat longitude:lng radiusInKM:radiusInKM  resultLimit:resultLimit completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Geo *geo = (Geo*)responseObj;
		NSLog(@"storageName is %@", geo.storageName);
		for(Points *point in geo.pointList)
		{
			NSLog(@"latitude is %f", point.lat);
			NSLog(@"longitude is %f", point.lng);
			NSLog(@"marker is %@", point.marker);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868);   
BigDecimal radiusInKM = new BigDecimal(1); 
int resultLimit	= 2;		 			
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.getPointsWithInCircle(storageName,lat,lng,radiusInKM,resultLimit);
System.out.println("storageName is " + geo.getStorageName();
String jsonResponse = geo.toString(); 
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868);  
BigDecimal radiusInKM = new BigDecimal(1);  
int resultLimit	= 2;		 			
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.getPointsWithInCircle(storageName,lat,lng,radiusInKM,resultLimit);
System.out.println("Storage Name is : "+geo.getStorageName());
for(int i=0;i<geo.getPointList().size();i++)
{
	System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
	System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
	System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
}
String jsonResponse = geo.toString();     
String storageName = "<Your_storage_name>";
double   lat = -73.99171;  
double  lng = 40.738868; 
double  radiusInKM = 1;   
int resultLimit    = 2;     			
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.GetPointsWithInCircle(storageName,lat,lng,radiusInKM,resultLimit, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	Geo geo = (Geo) response;   
		App42Log.Console("storageName is :" + geo.GetStorageName());
    	App42Log.Console("Lat is     : " + geo.GetPointList()[0].GetLat());
        App42Log.Console("Lng is     : " + geo.GetPointList()[0].GetLng());
        App42Log.Console("Marker is  : " + geo.GetPointList()[0].GetMarker());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var storageName = "<Your_storage_name>",
lat = -73.99171,  
lng = 40.738868, 
resultLimit	= 2, 
radiusInKM = 1,
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.getPointsWithInCircle(storageName,lat,lng,radiusInKM,resultLimit,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response.geo.storage;
		console.log("result is " + result.storageName)
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
Double   lat = -73.99171;  
Double  lng = 40.738868;   
Double  radiusInKM = 1;   
int resultLimit	= 2;
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
Geo geo = geoService.GetPointsWithInCircle(storageName,lat,lng,radiusInKM,resultLimit); 
Console.WriteLine("storageName is " + geo.GetStorageName()); 
Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
String jsonResponse = geo.ToString();
$storageName = "<Your_storage_name>";
$lat = -73.99171;
$lng = 40.738868;  
$radiusInKM = 1;
$resultLimit	= 2;
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->getPointsWithInCircle($storageName,$lat,$lng,$radiusInKM,$resultLimit);
print_r("storageName is " . $geo->getStorageName() . PHP_EOL);
print_r("sourceLat is " . $geo->getSourceLat() . PHP_EOL);
print_r("sourceLng is " . $geo->getSourceLng() . PHP_EOL);
$pointList = $geo->getPointList();
foreach ($pointList as $points) 
{
	print_r("sourceLat in point is : " . $points->getLat() . PHP_EOL);
	print_r("sourceLng in point is : " . $points->getLng() . PHP_EOL);
	print_r("sourceMarker in point is : " . $points->getMarker() . PHP_EOL);
}
$jsonResponse = $geo->toString(); 
Coming Soon
storageName = "<Your_storage_name>";
lat = "-73.99171";  
lng = "40.738868";  
radiusInKM = "1";
resultLimit	= 1;						
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
geo_service = api.build_geo_service()  
geo = geo_service.get_points_with_in_circle(storageName, lat, lng, radiusInKM, resultLimit);
puts "storageName is #{geo.get_storage_name}";
puts "sourceLat is #{geo.sourceLat}";
puts "distanceInKM is #{geo.distanceInKM}";
puts "sourceLng is #{geo.sourceLng}";
point_list = Array.new();
point_list = geo.point_list();
for point in point_list do
  puts "lat is #{point.lat}";
  puts "lng is #{point.lng}";
  puts "marker is #{point.marker}";
end
json_response = geo.to_s();
var storageName:String = "<Your_storage_name>"; 
var lat:Number =73;    
var lng:Number = 40;      
var radiusInKM:Number = 1;   
var resultLimit:int = 2; 
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.getPointsWithInCircle(storageName,lat, lng,radiusInKM, resultLimit,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		var geo:Geo = Geo(response);
		trace("storageName is : "+geo.getStorageName());
		trace("sourceLat is : "+geo.getSourceLat());
		trace("sourceLng is : "+geo.getSourceLng());
		trace("distanceInKM is : "+geo.getDistanceInKM());
		if(geo.getPointList().length > 0)
		{
			for(var j:int=0;j<geo.getPointList().length;j++)
			{
				trace("sourceLat in point is : "+ GeoPoint(geo.getPointList()[j]).getLat());
				trace("sourceLng in point is : "+ GeoPoint(geo.getPointList()[j]).getLng());
				trace("sourceMarker in point is : "+ GeoPoint(geo.getPointList()[j]).getMarker());			
			}
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
}
Coming Soon 
coming soon

Get Near By Points By Max Distance

Search the nearby point in a given range(In KM) from the specified source point. Points to be searched should already be stored on the cloud using a unique storage name handler.

Required Parameters

storageName - Unique handler for storage name. lat - Latitude of source point. lng - Longitude of source point. distanceInKM - Range in KM.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868);   
BigDecimal distanceInKM = new BigDecimal(1); 
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.getNearByPointsByMaxDistance(storageName, lat, lng, distanceInKM, new App42CallBack() {
public void onSuccess(Object response) 
{
	Geo geo = (Geo)response;
	System.out.println("Storage Name is : "+geo.getStorageName());
	for(int i=0;i<geo.getPointList().size();i++)
	{
		System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
		System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
		System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String storageName = "<Your_storage_name>";
Double   lat = -73.99171;  
Double  lng = 40.738868; 
Double  distanceInKM = 1; 
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.GetNearByPointsByMaxDistance(storageName, lat, lng, distanceInKM,new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Geo geo = (Geo) response;     
		Console.WriteLine("storageName is " + geo.GetStorageName()); 
		Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
		String jsonResponse = geo.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	}  
}
NSString *storageName = @"<Your_storage_name>";
double lat = -73.99171;  
double lng = 40.738868;  
double  distanceInKM = 1;  			
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService getNearByPointsByMaxDistance:storageName latitude:lat longitude:lng distanceInKM:distanceInKM completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Geo *geo = (Geo*)responseObj;
		NSLog(@"storageName is %@", geo.storageName);
		for(Points *point in geo.pointList)
		{
			NSLog(@"latitude is %f", point.lat);
			NSLog(@"longitude is %f", point.lng);
			NSLog(@"marker is %@", point.marker);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868);   
BigDecimal distanceInKM = new BigDecimal(1); 	 			
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.getNearByPointsByMaxDistance(storageName,lat,lng,distanceInKM);
System.out.println("storageName is " + geo.getStorageName();
String jsonResponse = geo.toString(); 
String storageName = "<Your_storage_name>";
BigDecimal lat = new BigDecimal(-73.99171);  
BigDecimal lng = new BigDecimal(40.738868);  
BigDecimal distanceInKM = new BigDecimal(1);  
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
Geo geo = geoService.getNearByPointsByMaxDistance(storageName,lat,lng,distanceInKM);
System.out.println("Storage Name is : "+geo.getStorageName());
for(int i=0;i<geo.getPointList().size();i++)
{
	System.out.println("sourceLat in point is : "+ geo.getPointList().get(i).getLat());
	System.out.println("sourceLng in point is : "+geo.getPointList().get(i).getLng());
	System.out.println("sourceMarker in point is : "+geo.getPointList().get(i).getMarker());	
}
String jsonResponse = geo.toString();     
String storageName = "<Your_storage_name>";
double   lat = -73.99171;  
double  lng = 40.738868; 
double  distanceInKM = 1;     		
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.GetNearByPointsByMaxDistance(storageName,lat,lng,distanceInKM, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	Geo geo = (Geo) response;   
		App42Log.Console("storageName is :" + geo.GetStorageName());
    	App42Log.Console("Lat is     : " + geo.GetPointList()[0].GetLat());
        App42Log.Console("Lng is     : " + geo.GetPointList()[0].GetLng());
        App42Log.Console("Marker is  : " + geo.GetPointList()[0].GetMarker());
        App42Log.Console("jsonResponse is  : " + geo.ToString());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var storageName = "<Your_storage_name>",
lat = -73.99171,  
lng = 40.738868, 
distanceInKM	= 1, 
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.getNearByPointsByMaxDistance(storageName,lat,lng,distanceInKM,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response.geo.storage;
		console.log("result is " + result.storageName)
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
Double   lat = -73.99171;  
Double  lng = 40.738868;   
Double  distanceInKM = 1;   
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
Geo geo = geoService.GetNearByPointsByMaxDistance(storageName,lat,lng,distanceInKM); 
Console.WriteLine("storageName is " + geo.GetStorageName()); 
Console.WriteLine("lat is " + geo.GetPointList()[0].GetLat());
String jsonResponse = geo.ToString();
$storageName = "<Your_storage_name>";
$lat = -73.99171;
$lng = 40.738868;  
$distanceInKM = 1;
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$geo = $geoService->getNearByPointsByMaxDistance($storageName,$lat,$lng,$distanceInKM);
print_r("storageName is " . $geo->getStorageName() . PHP_EOL);
print_r("sourceLat is " . $geo->getSourceLat() . PHP_EOL);
print_r("sourceLng is " . $geo->getSourceLng() . PHP_EOL);
print_r("Distance in KM is " . $geo->getDistanceInKM() . PHP_EOL);
$pointList = $geo->getPointList();
foreach ($pointList as $points) 
{
	print_r("sourceLat in point is : " . $points->getLat() . PHP_EOL);
	print_r("sourceLng in point is : " . $points->getLng() . PHP_EOL);
	print_r("sourceMarker in point is : " . $points->getMarker() . PHP_EOL);
}
$jsonResponse = $geo->toString(); 
Coming Soon
storageName = "<Your_storage_name>";
lat = "-73.99171";
lng = "40.738868";
distanceInKM = "1";					
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
geo_service = api.build_geo_service()  
geo = geo_service.get_near_by_points_by_max_distance(storageName, lat, lng, distanceInKM);
puts "storageName is #{geo.get_storage_name}";
puts "sourceLat is #{geo.sourceLat}";
puts "distanceInKM is #{geo.distanceInKM}";
puts "sourceLng is #{geo.sourceLng}";
point_list = Array.new();
point_list = geo.point_list();
for point in point_list do
  puts "lat is #{point.lat}";
  puts "lng is #{point.lng}";
  puts "marker is #{point.marker}";
end
json_response = geo.to_s();
var storageName:String = "<Your_storage_name>"; 
var lat:Number = 73;    
var lng:Number = 40;     
var distanceInKM:Number = 1;   
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.getNearByPointsByMaxDistance(storageName, lat,lng,distanceInKM,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{									
		var geo:Geo = Geo(response);
		trace("storageName is : "+geo.getStorageName());
		trace("sourceLat is : "+geo.getSourceLat());
		trace("sourceLng is : "+geo.getSourceLng());
		trace("distanceInKM is : "+geo.getDistanceInKM());
		if(geo.getPointList().length > 0)
		{
			for(var j:int=0;j<geo.getPointList().length;j++)
			{
				trace("sourceLat in point is : "+ GeoPoint(geo.getPointList()[j]).getLat());
				trace("sourceLng in point is : "+ GeoPoint(geo.getPointList()[j]).getLng());
				trace("sourceMarker in point is : "+ GeoPoint(geo.getPointList()[j]).getMarker());			
			}
		}
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
} 
Coming Soon 
coming soon

Delete Geo Points

Delete the specified Geo point or points from Cloud.

Required Parameters

storageName - Name of storage from which geo point has to be deleted. geoList - List of geo points that has to be deleted.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
ArrayList<GeoPoint> geoList = new ArrayList<GeoPoint>();					
GeoPoint gp = new GeoPoint();
gp.setMarker("Maplewood, NJ");
gp.setLat(new BigDecimal(-74.2713));
gp.setLng(new BigDecimal(40.73137));
geoList.add(gp);
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.deleteGeoPoints(storageName,geoList,new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
Coming Soon
NSString *storageName = @"<Your_storage_name>";
GeoPoint *geoPointObj = [[GeoPoint alloc]init];
geoPointObj.latitude = 22.77777;
geoPointObj.longitude = 55.26586;
geoPointObj.marker = @"first Marker";
GeoPoint *geoPointObj1 = [[GeoPoint alloc]init];
geoPointObj1.latitude = 22.565777;
geoPointObj1.longitude = 55.46986;
geoPointObj1.marker = @"second Marker";
NSArray *array = [NSArray arrayWithObjects:geoPointObj,geoPointObj1,nil];

[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService deleteGeoPoints:array geoStorageName:storageName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		App42Response *response = (App42Response*)responseObj; 
		NSString *success = response.isResponseSuccess;
		NSString *jsonResponse = [response toString]; 
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}]; 
Coming Soon 
String storageName = "<Your_storage_name>";
ArrayList<GeoPoint> geoList = new ArrayList<GeoPoint>();					
GeoPoint gp = new GeoPoint();
gp.setMarker("Maplewood, NJ");
gp.setLat(new BigDecimal(-74.2713));
gp.setLng(new BigDecimal(40.73137));
geoList.add(gp);
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
App42Response app42response = geoService.deleteGeoPoints(storageName,geoList); 
System.out.println("response is " + app42response) ;  
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String storageName = "<Your_storage_name>";
IList<GeoPoint> geoList = new List<GeoPoint>();    				
GeoPoint gp = new GeoPoint();
gp.SetMarker("Maplewood, NJ");
gp.SetLat(-74.2713);
gp.SetLng(40.73137);
geoList.Add(gp);     	
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.DeleteGeoPoints(storageName, geoList, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	App42Response app42Response = (App42Response) response;   
        App42Log.Console("App42Response is :" + app42Response.ToString());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var geoList = new Array();
var point =
{
	lat:-73.99171,
	lng:40.738868,
	marker: "test1"
};
geoList.push(point);
var storageName = "<Your_storage_name>",
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.deleteGeoPoints(storageName,geoList,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response;
		console.log("result is " + result)
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
IList<GeoPoint> geoList = new List<GeoPoint>();					
GeoPoint gp = new GeoPoint();
gp.SetMarker("Maplewood, NJ");
gp.SetLat(-74.2713);
gp.SetLng(40.73137);
geoList.Add(gp);
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
App42Response response = geoService.DeleteGeoPoints(storageName,geoList); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$storageName = "<Your_storage_name>";
$geoList = array();					
$gp = new GeoPoint();
gp.setMarker("Maplewood, NJ");
gp.setLat((-74.2713);
gp.setLng(40.73137);
geoList.add(gp);
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$response = $geoService->deleteGeoPoints($storageName,$geoList); 
print_r("Response is :".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
Coming Soon
var storageName:String = "<Your_storage_name>";
var geoPoint:GeoPoint = new GeoPoint();
geoPoint.setLat(73);
geoPoint.setLng(40);
geoPoint.setMarker("Maplewood");
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
var geoPoint1:GeoPoint = new GeoPoint();
geoPoint1.setLat(73.4);
geoPoint1.setLng(42);
geoPoint1.setMarker("Nz");

var geoList:Array = new Array();
geoList.push(geoPoint);
geoList.push(geoPoint1);
geoService.deleteGeoPoints(storageName, geoList,new callback());
class callback implements App42CallBack
{	
	public function onSuccess(response:Object):void
	{					
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
} 
Coming Soon 
coming soon

Delete Storage

Delete the specified Geo Storage from Cloud.

Required Parameters

storageName - Name of storage which has to be deleted.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.deleteStorage(storageName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	

}
});
String storageName = "<Your_storage_name>";
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.deleteStorage(storageName,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		App42Response geo = (App42Response) response;     
		String jsonResponse = geo.ToString();  
	}  
}  
NSString *storageName  = @"<Your_storage_name>";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService deleteStorage:storageName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		App42Response *response = (App42Response*)responseObj; 
		NSString *success = response.isResponseSuccess;
		NSString *jsonResponse = [response toString]; 
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}]; 
String storageName = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
App42Response response = geoService.deleteStorage(storageName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String storageName = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
App42Response app42response = geoService.deleteStorage(storageName); 
System.out.println("response is " + app42response) ; 
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String storageName = "<Your_storage_name>";
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.DeleteStorage(storageName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	App42Response app42Response = (App42Response) response;   
        App42Log.Console("App42Response is :" + app42Response.ToString());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var storageName = "<Your_storage_name>",
result ;  
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.deleteStorage(storageName,{  
	success: function(object) {  
		var geoObj = JSON.parse(object);  
		result = geoObj.app42.response;
		console.log("result is " + result)
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
App42Response response = geoService.DeleteStorage(storageName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$storageName = "<Your_storage_name>";
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
$response = $geoService->deleteStorage($storageName); 
print_r("Response is :".$response->toString());
$success = $respons->isResponseSuccess();
$jsonResponse = $respons->toString(); 
Coming Soon
storageName = "<Your_storage_name>";						
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")  
geo_service = api.build_geo_service()  
response = geo_service.delete_storage(storageName); 
success = response.is_response_success();
json_response = geo.to_s();
var storageName:String = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.deleteStorage(storageName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
}
Coming Soon 
coming soon

Exception Handling

The functions available under Geo Spatial API can throw some exceptions in abnormal conditions. Example of the same has been given below. E.g. If App developer is trying to delete the storage that does not exist, the function will throw the App42Exception (as shown below) with message as “Not Found” and the appErrorCode as “2903” and the details as “No Geo Storage exists with name ‘@storageName’”.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String storageName = "<Your_storage_name>";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
geoService.deleteStorage(storageName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	App42Exception exception = (App42Exception)ex;
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 2903)
	{
	// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
	}
	else if(appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
	// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); /* returns the Exception text in JSON format. (as shown below)*/	
	} 
});	 
String storageName = "<Your_storage_name>";
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService();  
geoService.deleteStorage(storageName,new Callback());  
public class Callback : App42Callback  
{ 
	public void OnException(App42Exception exception)  
	{  
		int appErrorCode = exception.GetAppErrorCode();
		int httpErrorCode = exception.GetHttpErrorCode();
		if(appErrorCode == 2903)
		{
			// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
		}
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
		String jsonText = exception.GetMessage(); 
	}  
	public void OnSuccess(Object object)  
	{  
		App42Response response = (App42Response) object;
		String jsonResponse = response.ToString();  
	}  
}  
					
NSString *storageName = @"<Your_storage_name>";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
GeoService *geoService = [App42API buildGeoService]; 
[geoService deleteStorage:storageName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		App42Response *response = (App42Response*)responseObj; 
		NSString *success = response.isResponseSuccess;
		NSString *jsonResponse = [response toString]; 
	}
	else
	{
		int appErrorCode = exception.appErrorCode;
		int httpErrorCode = exception.httpErrorCode;
		if(appErrorCode == 2903)
		{
			// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
		}
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
		NSString *jsonText = exception.reason; 	
	}
}];
String storageName = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
try
{
	App42Response response = geoService.deleteStorage(storageName); 
}
catch(App42Exception ex) 
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 2903)
	{
		// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 
}  
String storageName = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.buildGeoService(); 
try
{
	App42Response response = geoService.deleteStorage(storageName); 
}
catch(App42Exception ex) 
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 2903)
	{
		// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 
}
String storageName = "<Your_storage_name>";
App42Log.SetDebug(true);        //Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
geoService.DeleteStorage(storageName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnException(Exception ex)
	{
		int appErrorCode = ex.GetAppErrorCode();
        int httpErrorCode = ex.GetHttpErrorCode();
	if(appErrorCode == 2903)
	{
		// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = ex.GetMessage(); 
	}
    
    public void OnSuccess(object response)
    {
        App42Log.Console("response is :" + response.ToString());
	}
}
var storageName = "<Your_storage_name>",
appErrorCode ;
App42.initialize("API_KEY","SECRET_KEY");
var geoService  = new App42Geo();
geoService.deleteStorage(storageName,{
	success: function(object) {
	},
	error: function(error) {
	var geoObj = JSON.parse(error);
	appErrorCode = geoObj.app42Fault.appErrorCode;
		if(appErrorCode == 2903)
		{
			// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
		}
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
	}
});
Coming Soon
Coming Soon
String storageName = "<Your_storage_name>";
App42API.Initialize("API_KEY","SECRET_KEY");
GeoService geoService = App42API.BuildGeoService(); 
try
{
	App42Response response = geoService.DeleteStorage(storageName); 
}
catch(App42Exception ex) 
{
	int appErrorCode = ex.GetAppErrorCode();
	int httpErrorCode = ex.GetHttpErrorCode();
	if(appErrorCode == 2903)
	{
		// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = ex.GetMessage(); 
}  
$storageName = "<Your_storage_name>";
App42API::initialize("API_KEY","SECRET_KEY");
$geoService = App42API::buildGeoService();
try{
	$response = $geoService->deleteStorage($storageName);
   }
catch(App42Exception $ex) 
{
	$appErrorCode = $ex->getAppErrorCode();
	$httpErrorCode = $ex->getHttpErrorCode();
	if($appErrorCode == 2903)
	{
		// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
	}
	else if($appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if($appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	$jsonText = $ex->getMessage(); 	
}
Coming Soon
Coming Soon
var storageName:String = "<Your_storage_name>";
App42API.initialize("API_KEY","SECRET_KEY");
var geoService:GeoService = App42API.buildGeoService(); 
geoService.deleteStorage(storageName,new callback());
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)  
	}  
	public function onException(exception:App42Exception):void  
	{  
		var appErrorCode:int = exception.getAppErrorCode();  
		var httpErrorCode:int = exception.getHttpErrorCode();  
		if(appErrorCode == 2903)
		{
			// Handle here for Not Found (No Geo Storage exists with name '@storageName'.)
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}
	}  	
}
Coming Soon
coming soon

Error Codes

Functions in Message API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):

1400 - BAD REQUEST - The Request parameters are invalid. 1401 - UNAUTHORIZED - Client is not authorized. 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again. 2900 - NOT FOUND - No destination found using given parameter Lat : '@lat' Long : '@lng' and Distance In KM '@distanceInKM'. 2901 - NOT FOUND - No destination found using given parameter Lat : '@lat' Long : '@lng' and Radius In KM '@radiusInKM'. 2902 - NOT FOUND - No Geo Storage exists. 2903 - NOT FOUND - No Geo Storage exists with name '@storageName'. 2904 - NOT FOUND - No Geo Points in the storage '@storageName' exist. 2905 - NOT FOUND - No destination found using given parameter Lat : '@lat' Long : '@lng'. 2906 - NOT FOUND - The number of Storage are less than the specified offset. 2907 - NOT FOUND - No Geo Point found using given parameter Marker: '@marker' Lat : '@lat' Long : '@lng'.