Ich aktualisiere eine Appcelerator App, die "bencoding.map" https://github.com/benbahrenburg/benCoding.Map/blob/master/documentation/index.md verwendet.Appcelerator Alternative zu KML in bencoding.map
Nun ist "bencoding.map" veraltet und ich habe es aktualisiert, um die native Titanium Kartenfunktion zu verwenden.
Allerdings habe ich jetzt ein Problem, wo die "addKML" von "bencoding.map" ist nicht verfügbar in der Titanium map api.
Weiß jemand, was ich verwenden kann, um die KML-Funktionalität zu ersetzen? Der Code ist unten:
function onkmlCompleted(){
Ti.API.info("onkmlCompleted");
Ti.API.info("onkmlCompleted"+JSON.stringify(mapLoadingWindow));
mapLoadingWindow.close({animated:false});
mapView.removeEventListener('kmlCompleted',onkmlCompleted);
};
mapView.addEventListener('kmlCompleted',onkmlCompleted);
mapView.addKML({
path:"some_file.kml", //Path to our kml file
tag : 55, //Integer value used as the tag for all polygons and annotations. If you want use remove you need to set this to a known value.
flyTo:false, //Will set your zoom to show all of your points added (false by default)
//Contains all of the details used to process overlays from your KML file
overlayInfo:{
title:'my kml batch key', //This identifies all of the overlay elements in your kml file. This is also used for delete or query operations.
alpha:0.5, //Alpha value of your overlays
lineWidth:1.2, //Line Width of your overlays
strokeColor:'#000', //Stroke Color of your overlays
color:'yellow', //Sets the color of all your overlays (if left off, a random color will be selected)
useRandomColor:true, //If true, a random color will be selected, this overrides the color provided if true
}
});