Skip to content

Instantly share code, notes, and snippets.

@clathrop
Created July 18, 2012 18:27
Show Gist options
  • Save clathrop/3137903 to your computer and use it in GitHub Desktop.
Save clathrop/3137903 to your computer and use it in GitHub Desktop.
iOS and Android: Overlaid views on top of maps
var win1 = Ti.UI.createWindow({
backgroundColor : '#fff',
exitOnClose : true,
navBarHidden : true,
//layout : 'vertical'
});
var viewbot = Ti.UI.createView({
});
win1.add(viewbot);
var map1 = Ti.Map.createView({
mapType : Ti.Map.STANDARD_TYPE,
animate : true,
region : {
latitude : 37.423156,
longitude : -122.084917,
latitudeDelta : 0.01,
longitudeDelta : 0.01
},
regionFit : true,
annotations : [Ti.Map.createAnnotation({
latitude : 37.423156,
longitude : -122.084917,
image : '/images/MapPin.png'
})],
userLocation : true,
height : Ti.UI.Fill
});
viewbot.add(map1);
var square1 = Ti.UI.createView({
height : 20,
width : 20,
backgroundColor : 'red',
bottom : 10,
left : 10,
//zIndex: 1
});
viewbot.add(square1);
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment