if(CategoryID=='4')
{
World.markerDrawable_idle = new AR.ImageResource("assets/shopping.png");
World.markerDrawable_selected = new AR.ImageResource("assets/shopping_selected.png");
}
else if(CategoryID=='5')
{
World.markerDrawable_idle = new AR.ImageResource("assets/shop.png");
World.markerDrawable_selected = new AR.ImageResource("assets/shop_selected.png");
}else {
World.markerDrawable_idle = new AR.ImageResource("assets/marker_idle.png");
World.markerDrawable_selected = new AR.ImageResource("assets/marker_selected.png");
}
check the result
hello,
i have seen a use case based on your SDK that shows wifi spots with different markers(see the image) i have the same issue. i want to show different markers for each type of monuments (doors, mosques...) so i tried the following :
if(poiData.type=="mosquee)
{this.markerDrawable_idle = new AR.ImageDrawable(World.markerDrawable_idle, 2.5, {
zOrder: 0,
opacity: 1.0,
onClick: Marker.prototype.getOnClickTrigger(this)
});
// create an AR.ImageDrawable for the marker in selected state
this.markerDrawable_selected = new AR.ImageDrawable(World.markerDrawable_selected, 2.5, {
zOrder: 0,
opacity: 0.0,
onClick: null
});
}
else {
this.markerDrawable_idle = new AR.ImageDrawable(World.markerDrawable_idle_2, 2.5, {
zOrder: 0,
opacity: 1.0,
onClick: Marker.prototype.getOnClickTrigger(this)
});
// create an AR.ImageDrawable for the marker in selected state
this.markerDrawable_selected = new AR.ImageDrawable(World.markerDrawable_selected_2, 2.5, {
zOrder: 0,
opacity: 0.0,
onClick: null
});
},
so is it possible?? if not can you explain why because i will need to include it in the reporting file??
thanks for the notice eva but the topic is titled 'mutiple markers' and i also wan to show different markers on the scene of ER geo based app ??
World.markerDrawable_travel = new AR.ImageResource("assets/travel.png");
World.markerDrawable_shopping = new AR.ImageResource("assets/shopping.png"); and then based on my type , i loaded the respective drawable. switch (CategoryID) {
case '1':
World.markerDrawable_idle = new AR.ImageResource("assets/travel.png");
break;
case '4':
World.markerDrawable_idle = new AR.ImageResource("assets/shopping.png");
can you please load the complete file?? i didn't understand how you did it!! did you create separate objects of AR.imageRessource(); ??
Abdul Farhan Khan
I need to show different markers based on some condition on a single AR scene. Any help ??