0
A
답변
0
지도 마커 (사례의 제품)를 클릭하면 해당 마커의 가격을 정보 창 (해당 마커)으로 표시 할 수 있습니다.
annotation의 title을 제품 가격으로 설정하십시오.
( titanium docs에서 가져온 예) 같은뭔가 :
var Map = require('ti.map'); //extend map global object
var win = Titanium.UI.createWindow();
var mountainView = Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
title:"Appcelerator Headquarters", //<--------- YOUR PRODUCT PRICE HERE
subtitle:'Mountain View, CA',
pincolor:Map.ANNOTATION_RED,
myid:1 // Custom property to uniquely identify this annotation.
});
var mapview = Map.createView({
mapType: Map.NORMAL_TYPE,
region: {latitude:33.74511, longitude:-84.38993,
latitudeDelta:0.01, longitudeDelta:0.01},
animate:true,
regionFit:true,
userLocation:true,
annotations:[mountainView]
});
win.add(mapview);
// Handle click events on any annotations on this map.
mapview.addEventListener('click', function(evt) {
Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid);
});
win.open();