You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2012-08-07 17:49:30

exactspace
Member
Registered: 2012-02-28
Posts: 43

Need to somehow label current pano

I'd like an easy way for my javascript code to grab the name of the current pano.  I'm most likely not asking for javascript code inside my tour, but to make it easy for anyone designing the tour here to add something inside my PanoTour Pro project.  Is there a field I can fill out (when I click on a pano inside PanoTour Pro) as the current name of the pano?

The rest of the work I can figure out I think.  Some javascript will grab this name, and then use it to do a search in an xml file, and return the info.

I don't want to add these pano labels in the xml files that PanoTour Pro outputs, because then every time I build my project I will need to add them again.

Any ideas, or alternatives?  Many thanks.

Last edited by exactspace (2012-08-07 17:50:23)

Offline

 

#2 2012-08-07 18:02:33

klausesser
Member
From: Düsseldorf, Germany
Registered: 2006-05-22
Posts: 6405
Website

Re: Need to somehow label current pano

exactspace wrote:

I'd like an easy way for my javascript code to grab the name of the current pano.  I'm most likely not asking for javascript code inside my tour, but to make it easy for anyone designing the tour here to add something inside my PanoTour Pro project.  Is there a field I can fill out (when I click on a pano inside PanoTour Pro) as the current name of the pano?

The rest of the work I can figure out I think.  Some javascript will grab this name, and then use it to do a search in an xml file, and return the info.

I don't want to add these pano labels in the xml files that PanoTour Pro outputs, because then every time I build my project I will need to add them again.

Any ideas, or alternatives?  Many thanks.

Could you tell what you mean precisely? There are some solutions. Do you restrict it to Javascript?

best, Klaus


If you want something you´ve never had,
then you´ve got to do something you´ve never done.

Online

 

#3 2012-08-07 18:18:09

exactspace
Member
Registered: 2012-02-28
Posts: 43

Re: Need to somehow label current pano

Yes sorry I was a bit messy explaining.  So I just want to make things as easy as possible with development. I am restricted to Javascript.

If there was a way to click a panorama on PanoTour Pro and set a field's variable to whatever I want, preferably the name of the panorama, I could have my code grab that to do a search in an xml file as a description of the room I'm in.

Now that I think about it though, I could probably have my code somehow grab the name of the source image filename used for the pano.  I know this is stored somewhere because I can add alert(%p) on a hotspot javascript property, and it will display an alert box of the image name without the extension when I touch the hotspot.

Offline

 

#4 2012-08-07 18:27:42

exactspace
Member
Registered: 2012-02-28
Posts: 43

Re: Need to somehow label current pano

I think I would want to go with the source pano image used as the pano name because that's more automatic and cleaner.

Offline

 

#5 2012-08-07 19:21:15

exactspace
Member
Registered: 2012-02-28
Posts: 43

Re: Need to somehow label current pano

So it looks like I DO need javascript of the variable name of the current pano in my tour.  Let me know if this is more on the krpano end.

Offline

 

#6 2012-08-07 20:57:17

exactspace
Member
Registered: 2012-02-28
Posts: 43

Re: Need to somehow label current pano

Basically if I just display this in javascript using alert(); I'm successful:

http://i.imgur.com/vgtem.png

Any ideas on how to retrieve that?

Offline

 

#7 2012-08-08 00:02:18

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9712
Website

Re: Need to somehow label current pano

As I recall the next version of PTP/PTP (V2.x) will offer the facility to set scene titles from within the GUI.

But not sure that's what you are loking for anyway?


Andrew Stephens
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.

Offline

 

#8 2012-08-08 08:22:15

bdd
Administrator
Registered: 2011-01-18
Posts: 621
Website

Re: Need to somehow label current pano

The "%p", "%f" and "%s" parameters you can set in your JS call in the hotspot properties do not use a "stored" data of the tour.
They are replaced by PTP when the tour is build.
So no, the current version does not create any meta-data for each panorama.

But as Andrew said in the previous post, the next major version of PTP will create some text data, you will be able to use in your own "plugin/krpano code/JS code/etc..." .
Each panorama and each group of panorama will contain at least a title and a description field.

Gérald

Offline

 

#9 2012-08-08 17:57:11

exactspace
Member
Registered: 2012-02-28
Posts: 43

Re: Need to somehow label current pano

Thanks, that's good to know it will be in the next major version!  I guess I'll just keep trying to figure out a way to hack it in.

Although I'm still curious what klausesser has to say.

Last edited by exactspace (2012-08-08 17:58:29)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson