Code Monkey home page Code Monkey logo

titanium-appcelerator-geofence-module-ios's People

Contributors

gurudey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

titanium-appcelerator-geofence-module-ios's Issues

Repeating regions

Hi,

Trying to use this to basically monitor a region (point) then when the user exits create a new monitoring region based on their location.

I'm using the same id / title to refresh the existing region and get some odd issues -- multiple instances of "monitoring regions" and incorrect lon/lat being shown

Is there a good way to handle this scenario?

its work for TI 8.3.0 Alloy App ?

var ci_geofencing = require('ci.geofencing');

var regions = [];
regions.push({
"title" : "Aurus ",
"latitude" : 19.082996,
"longitude" : 72.8401475,
"radius" : 20
});

regions.push({
"title" : "Malad Station",
"latitude" : 19.1869676,
"longitude" : 72.8467006,
"radius" : 20
});

regions.push({
"title" : "Andheri Station",
"latitude" : 19.1205496,
"longitude" :72.84557,
"radius" : 20
});

ci_geofencing.startGeoFencing(regions, function(event) {
Ti.API.info('info ' + JSON.stringify(event, null, 2));

if ( event.type === "exited_region") {
	
	Ti.API.info('exited_region ' + JSON.stringify(event, null, 2));
	alert( 'exited_region ' + event.identifier);
	
	//ci_geofencing.stopGeoFencing();  
}

if ( event.type === "monitoring_region") {
	
	Ti.API.info('monitoring_region ' + JSON.stringify(event, null, 2));
	alert( 'monitoring_region ' + event.identifier);
	
	ci_geofencing.stopGeoFencing();
}

 if (event.type == "entered_region")
{
	Ti.API.info('entered_region ' + JSON.stringify(event, null, 2));
	
			alert( 'entered_region ' + event.identifier);


}

});

Only "monitoring_region"

Hello, this is exactly what Im looking for! Awesome for that. But my issue is that it doesnt work for me at all. Well, Im successfully registering regions,

Started monitoring blaha region
{
identifier = blaha;
source = "[object CiGeofencingModule]";
type = "monitoring_region";
}

And the region Im testing has a radius for 10, which Im thinking means 10 meters for this module (?)

I have enabled "Location" as background data in the TiApp-file too.

Am I missing something here? The events are not firing while I work in and outside the region.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.