"bencoding.map" https://github.com/benbahrenburg/benCoding.Map/blob/master/documentation/index.mdを使用していたAppceleratorアプリをアップデートしています。bencoding.mapでKMLに代わるAppcelerator
"bencoding.map"は非推奨になっていますので、ネイティブのチタニウムマップ機能を使用するように更新しました。
しかし、 "bencoding.map"の "addKML"がTitaniumマップAPIで使用できないという問題がありました。
私はKMLの機能を置き換えるために何が使えるのか誰にでも分かりますか?以下のコードは次のとおりです。
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
}
});