Created
March 14, 2012 07:24
-
-
Save addieljuarez/2034831 to your computer and use it in GitHub Desktop.
mapa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ | |
// app.js | |
// ModuloMapa | |
// | |
// Created by addiel on 2012-03-03. | |
// Copyright 2012 addiel. All rights reserved. | |
// | |
// | |
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
// | |
//creation of the window | |
var winMapa = Titanium.UI.createWindow({ | |
title: 'mapa', | |
backgroundColor:'#000', | |
}) | |
//creation of the annotation (point) | |
var punto = Titanium.Map.createAnnotation({ | |
latitude:19.394716, | |
longitude:-99.090532, | |
title:"UPIICSA", | |
subtitle:'IPN', | |
pincolor:Titanium.Map.ANNOTATION_RED, | |
//pincolor:Titanium.Map.ANNOTATION_GREEN, | |
//pincolor:Titanium.Map.ANNOTATION_PURPLE. | |
animate:true, | |
//eftButton: '../images/appcelerator_small.png', | |
//myid:1 // CUSTOM ATTRIBUTE THAT IS PASSED INTO EVENT OBJECTS | |
}); | |
//CREATION OF THE MSP | |
var mapview = Titanium.Map.createView({ | |
mapType: Titanium.Map.STANDARD_TYPE, | |
//mapType: Titanium.Map.SATELLITE_TYPE, | |
//maptype: Titanium.Map.HYBRID_TYPE, | |
region: | |
{latitude:19.394716, | |
longitude:-99.090532, | |
latitudeDelta:0.01, | |
longitudeDelta:0.01}, | |
animate:true, | |
regionFit:true, | |
userLocation:true, | |
annotations:[punto] | |
}); | |
winMapa.add(mapview); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment