I don't really have a use case, I was just testing various capabilities of Wikitude. I used one of your examples to create 20 POIs. After 3 POIs are clicked in succession I execute the following code:
myRelativeMarker = new CouponMarker(); isn't that sufficient, based on the code above to display the imageDrawable?
Andy
yes that is exactly what I want to do. I just want to display an image drawable at a relative location (relative to the user).
Thanks
Hi Eva,
I finally got it working. The problem was I didn't understand the Northing and Easting parameters so the image wasn't showing up where I expected it to and the scale was so small that it was almost invisible. Sorry to waste your time and thanks for your attempts to help me
Andy
Wilson Bell
Do you see anything wrong with the code below - I verified the ImageResource url is valid
function CouponMarker() {
var couponLocation = new AR.RelativeLocation(null, 1, 1, 100);
var markerDrawable_coupon = new AR.ImageResource(cdnUrl + World.target + "/assets/coupon.png");
this.markerDrawable_Coupon = new AR.ImageDrawable(markerDrawable_coupon, 5, {
zOrder: 2,
opacity: 1.0
});
this.markerObject = new AR.GeoObject(couponLocation, {
drawables: {
cam: this.markerDrawable_Coupon
}
});
return this;
}
Just creating of object of this type should put the Image in front of the user right?
I created 20 POIs using your marker class. I later call a function that creates this relative location with a drawable. I verified that the CouponMarker code is called at the appropriate time. Is there something else I need to do? DOesn't the creation of the AR.GeoObject case the drawables to be rendered?
Thanks