Start a new topic
Solved

Multiple markers

 I need to show different markers based on some condition on a single AR scene. Any help ??


Hello,

Great news for you as today we launched SDK 7, which introduces as well your feature request, “Multiple Image Target”. In a nutshell, SDK 7 includes:
  • Object Recognition
  • Multiple Image Target Recognition
  • Hit-testing API for SLAM
  • Instant tracking improvements
  • Extended recognition range
Multiple Image Target’ feature enables recognition of several images simultaneously. Once the images are recognized, developers will be able to layer 3D models, buttons, videos, images and more on each target. Additionally, augmentations will be able to interact with each other based on the targets’ positions.


Check out this blog for a developer insight. You can download the new SDK 7 directly from our Download page. Enjoy our new cool features ;)

Thanks
Eva

can you please load the complete file?? i didn't understand how you did it!! did you create separate objects of AR.imageRessource(); ??

Mohamed,

I have 5,6 types of markers. So what i did, i created separate objects ..

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");

 

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 ??


Hello Mohamed,

Since the comment you posted here is not relevant with the topic titled 'Multiple Targets' could you please remove it from here and create a new one? We need to make sure that our users can easily find what they are searching for based on the topic title.

Thanks
Eva

 

image


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??

Hello Abdul,

Recognizing multiple targets at the same time is not yet possible. Please have a look at the documentation section here to see how you can recognize multiple targets, but not at the same time.

Thanks
Eva

 

 check the result

shfjds.png
(210 KB)
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");
}

 

Hi Eva, I have around 7 categories, each have its own image. The user normally selects the categories and all the locations of that category is displayed on to the scene (its working fine), there is one more option of showing All data, For that i have to display multiple images as marker to differentiate the data.

i have tried to change the World.markerdrawable when iam parsing the data, sometimes it works but most of the time the image is distorted or becomes upside down

 

Hello Abdul,

I you want to have multiple markers at the same time then, I am afraid this is something not possible with our SDK. However, please note that this functionality will be added soon in our SDK.

May I ask for your use case to see if there is another workaround?

Thanks
Eva

 

Login or Signup to post a comment