How do I create a mapview with titanium appcelerator mobile?
-
26-09-2019 - |
Question
I just start to work with appcelerator and I haven't found a good layout tutorial yet. At the moment I try to show a mapview with a specific location. Has anybody an example or a good pointer on how to do this?
Solution
Download the KitchenSink which is mentioned on the Getting Started page. It has several hundred examples on how to use the various Titanium based APIs - including MapViews.
Here's a simple example
var mapview = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5},
animate:true,
regionFit:true,
userLocation:true
});
win.add(mapview);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow