In my Titanium app I am trying to show map view, I write my below code in button click event
var mapview = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region: {latitude:37.389569, longitude:-122.050212,
latitudeDelta:0.1, longitudeDelta:0.1},
animate:true,
regionFit:true,
userLocation:false
});
win.add(mapview);
when I used above one, my getting stopped unfortunately. error :Unable to resolve superclass of Lti/modules/titanium/map/TiMapActivity; (678)
Please do help for this.
Thanks
Ti.Map.createView was deprecated in version 3.2.0, which is the version I am assuming you are using.
Instead use this replacement module. That guide will show you how to integrate with both iOS and Android.
Essentially, download this module, and install it, add it to your tiapp.xml of your project:
<modules>
<!-- Add this line to your modules section -->
<module platform="android">ti.map</module>
</modules>
Get a Google Maps API Key, and add it to the android manifest section of your tiapp.xml as detailed in this guide (Titanium Modules.Map Install Guide and API). Then use it like this:
var Map = require('ti.map');
var mapview = Map.createView({mapType:Map.NORMAL_TYPE});