Problems with making a Map View and Current Location
I am trying to open a Map View with an alert that shows my current location - seems pretty simple but I just get a blank screen - here is my code - what am I doing wrong?
3 Answers
-
If you are running on Android, you need to go get a key from Google.
The Best documentation for this is still on codestrong - http://www.codestrong.com/timobile/howto/using-maps-on-android
Greg
-
You are actually not creating an annotation.
var annotation = Titanium.Map.createAnnotation({ latitude:37.390749, longitude:-122.081651, title:"Appcelerator Headquarters", subtitle:'Mountain View, CA', pincolor:Titanium.Map.ANNOTATION_RED, animate:true, leftButton: '../images/appcelerator_small.png', myid:1 // CUSTOM ATTRIBUTE THAT IS PASSED INTO EVENT OBJECTS });
-
@ Glenn - That works! It brings up the map, however, I don't want it to default to Apple Headquarters. I have read that we can't get the actual current location until we put it on a device, but it seems like this code:
latitude:37.390749, longitude:-122.081651,
is forcing it to that location which I don't want…