Start a new topic

Pinch Zoom Camera

Hello guys, 

I am using Wikitude SDK for cordova.

I want to implement the pinch zoom feature on my augmented reality camera. 

Currently I am using a range for zooming.

In html  I have  

<input id="panel-zoom-range" type="range" data-highlight="true" name="rangeSlider" min="0" max="100" value="0" onChange="sliderChange()" data-show-value="false" step="5" data-popup-enabled="false">


and on js file I have :


function sliderChange(){

var slider_value = document.getElementById('panel-zoom-range').value;

		var maxRangeValue = ( - 1) * (slider_value / 100) + 1; = maxRangeValue;

 This works fine but I need the app to have the pinch zoom using fingers.

Is there some way to implement this ? 

Thank you

Hello Tedi,

This could be possible but you would need to write an input plugin yourself and render the camera frame. However, since you are using our Cordova extension, you cannot implement another plugin.



Hello Eva,

Thank you for the reply, but I didn't quite understand.

Can you be a little more specific please? 

Hi Tedi,

Of course! In order to add such a request into your app you would need to create your own plugin (you can find more information here). This could work perfectly fine with our Javascript API. However, it is not possible to write your own plugin and add it to our Cordova plugin, since this is only supported with our Javascript API. So the only solution for you would be to switch to Javascript API and then write your own plugin.



Login or Signup to post a comment