PTZ Mapped move

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
alarmix
Posts: 8
Joined: Mon Sep 08, 2014 6:55 am

PTZ Mapped move

Post by alarmix » Thu Jan 24, 2019 9:13 am

It has already popped up 2 years ago in a topic:

In a live view of a PTZ camera capable of mapped move, clicking on the image makes a zoom instead of the mapped move to the clicked point.

Running 1.32.3 with Axis v2 control.

Has anyone found the solution?

rockedge
Posts: 1154
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: PTZ Mapped move

Post by rockedge » Fri Jan 25, 2019 1:15 pm

the last version that does this for sure I found was 1.30.4...maybe 1.31+. I was going to look it over while I am making some PTZ control script modifications and I noticed this was the case as well. I think it has to do with the way in earlier versions how the ptz controls were called by a link and replaced the events list with the control buttons....now the ptz buttons and the events list are together so is it one or the other? Meaning zoom function or mapping feature? perhaps an added control button or link to choose the zoom and the ability to switch into ptz mapping...so one can point and click on the stream image and the camera will move to the point.

alarmix
Posts: 8
Joined: Mon Sep 08, 2014 6:55 am

Re: PTZ Mapped move

Post by alarmix » Wed Jan 30, 2019 11:39 am

after a few hours, found the solution!
there are actually two errors:
first, the Axis API expects integers for the mapped move, watch.js needs parseInt()

Code: Select all

function handleClick( event ) {
  var target = event.target;
  var x = parseInt(event.page.x - $(target).getLeft());
  var y = parseInt(event.page.y - $(target).getTop());
then, in watch.js.php

Code: Select all

var showMode = "<?php echo ($showPtzControls)?"control":"events" ?>";

rockedge
Posts: 1154
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: PTZ Mapped move

Post by rockedge » Wed Jan 30, 2019 2:39 pm

interesting...I will see how it works with FOSCAMR2C...can one still zoom on the stream image?

alarmix
Posts: 8
Joined: Mon Sep 08, 2014 6:55 am

Re: PTZ Mapped move

Post by alarmix » Wed Jan 30, 2019 3:28 pm

with this setup, no.
but do you really need digital zoom in the browser if your cam is capable of real optical zoom?
if yes, you could put a button on the button bar to toggle between movemap and zoom. the last button is zoom out, you just have to replicate it as zoom in

rockedge
Posts: 1154
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: PTZ Mapped move

Post by rockedge » Wed Jan 30, 2019 3:54 pm

I would need to toggle the mapping feature on and off..all my systems have cameras with no optical zoom capabilities.
I like using the mapping feature and I did see that the showing the PTZ controls automatically in the stream view would mean some kind of switch to change from PTZ mapping to Zoom.

your idea of a toggle switch that selects mapping OR zoom is a good one.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest