Skip to content

Instantly share code, notes, and snippets.

View AppWerft's full-sized avatar

Rainer Schleevoigt AppWerft

  • Hamburger AppWerft
  • Hamburg, St. Pauli
View GitHub Profile
{
"version": 0.6,
"generator": "Overpass API",
"osm3s": {
"timestamp_osm_base": "2016-10-12T08:24:02Z",
"timestamp_areas_base": "2016-10-12T06:08:02Z",
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
},
"elements": [
package de.appwerft.overpass;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class PostProcess {
private JSONObject foo;
private JSONArray elements;
package de.appwerft.overpass;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class PostProcess {
private JSONObject foo;
private JSONArray elements;
Ti.Media.createSound({
url : "Silent.wav",
looping : true
}).play();
Ti.Geolocation.trackSignificantLocationChange=true;
Ti.Geolocation.pauseLocationUpdateAutomatically = true;
Ti.Geolocation.addEventListener("location", function() {
});
var i = 0;
function bgServiceStart() {
console.log("bgServiceStart");
Ti.Geolocation.allowsBackgroundLocationUpdates = true;
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_LOW;
Ti.Geolocation.trackSignificantLocationChange = true;
var service = Ti.App.iOS.registerBackgroundService({
url : 'bg-service.js'
});
console.log("bgService registered");
function getCoords() {
Ti.Geolocation.getCurrentPosition(function(e) {
Ti.API.warn(e);
});
}
var TiBeacons = require('org.beuckman.tibeacons');
var UUID = "636f3f8f-6491-4bee-95f7-d8cc64a863b5";
var LCAT = "🙃";
module.exports = function(label) {
TiBeacons.enableAutoRanging();
function enterRegion(e) {
label.setText(e);
}
function exitRegion(e) {
label.setText(e);
@AppWerft
AppWerft / leaflet.google.js
Created November 12, 2016 09:20
Using Google Map tiles with the Leaflet mapping library + google styles
/*
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: 16,
var activity = $.getActivity();
if (activity) {
activity.onCreateOptionsMenu = function(e) {
activity.actionBar.displayHomeAsUp = true;
e.menu.clear();
e.menu
.add(
{
title : 'Weg damit!',
showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS,
module.exports = function(options, callbacks) {
var start = new Date().getTime();
if (!TouchId.isSupported()) {
alert("This device doesn't support fingerprint sensor");
return;
}
var dialog = null;
if (Ti.Platform.osname == "android") {
var timer = 0;
var cronHandler = function() {