示例#1
0
	goButton.addEventListener('click', function() {
		var MapWin = require('ui/common/MapWindow');
		var map = new MapWin(_perspective);
		map.open({
			modal : true
		});

		var dialog = Ti.UI.createAlertDialog({
			cancel : 2,
			buttonNames : ['Install', 'Set POI', 'Cancel'],
			message : 'NaviBridge must be installed prior to setting the perspective as the POI',
			title : 'NaviBridge'
		});
		dialog.addEventListener('click', function(e) {
			if (e.index === e.source.cancel) {
				Ti.API.info('The cancel button was clicked');
			}

			switch(e.index) {
				case 0:
					NAVIBRIDGE.installNavi();
					break;
				case 1:
					NAVIBRIDGE.addPOI({
						lat : _perspective.locLat,
						lon : _perspective.locLong
					});
					break;
				case 2:
					return;
			}

			acs.update(_perspective);
		});
		dialog.show();
	});
示例#2
0
		mapButton.addEventListener('click', function() {
			var MapWin = require('ui/common/MapWindow');
			var map = new MapWin(_bounty);
			map.open({modal:true});
		});