Janusz
Janusz

Reputation: 189484

How do I create a mapview with titanium appcelerator mobile?

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?

Upvotes: 2

Views: 7635

Answers (1)

jhaynie
jhaynie

Reputation: 2368

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);

Upvotes: 7

Related Questions