ti.map
ti.map copied to clipboard
Android: KML/geoJSON support
For testing
Example:
var mapview = Map.createView({
mapType: Map.NORMAL_TYPE,
region: {
latitude: 47.75051421372,
longitude: 8.95476601120893,
latitudeDelta: 0.01,
longitudeDelta: 0.01
},
kml: fileKML.read(),
geoJSON: {
json: fileGeoJSON.read(),
// file: '/file.json`,
backgroundColor: "rgba(0,0,0,0.5)",
bordercolor: "yellow",
borderWidth: 4
},
});
var file = Ti.Filesystem.getFile("example.kml");
mapview.kml = file.read();