You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

mhamilton

Beginner

  • "mhamilton" started this thread

Posts: 2

Occupation: Student/Co-op

  • Send private message

1

Tuesday, May 5th 2009, 3:28pm

Using KRPano to display dynamic content

I would like to somehow use KRPano to show data in a Google Maps-esque way. The data is 2 dimensional, but it is dynamic based on what the user has selected to show. Is there any way to trick the viewer into thinking this is looking at a folder of pictures when it really isn't? My idea is to point KRPano to a java servlet that would act like the folder containing the picutres, and based on the user's input and what KRPano is reqeusting, it would serve a picture and then KRPano could be used to dispaly the images.
If anyone has any suggestions on whether this is possible at all, they would be greatly appreciated.
Thanks.

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

2

Wednesday, May 6th 2009, 2:05am

I THINK I get what you are asking and I would have to believe that it is possible (a bit more info would help decide *smile* )

I'm pretty sure others have set krpano up to load information dynamically based upon php scripts. I've used js in limited capacities to easily control what is shown.

There are others MUCH more capable of answering this... they'll be around here later tonight (relative to my time).

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

3

Wednesday, May 6th 2009, 5:30am

I use PHP to stream my images, but I don't think you can load just parts depending on what you selected to view, correct me if I am wrong but I think krpano loads every part of the pano at the same time ( at least every layer ).

saying that using PHP is easy to load dynamic files, and streaming them back to krpano. I am using it to count pano views and keep statistics and such.

I am sure it can be done for tiles and every other format krpano supports.

I have no example for what you are asking but if you need an example on how to stream a file to krpano i will gladly post it :)

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

4

Wednesday, May 6th 2009, 6:26am

Theory talk begin:

If you can use php to stream images... then you can use php to stream partial panos... which in effect COULD be "parts" of an image.

Then... maybe you could stream multi-res partial panos / images... ?

Theory talk end.

I wish I had more time to test out such theories. *cursing*

mhamilton

Beginner

  • "mhamilton" started this thread

Posts: 2

Occupation: Student/Co-op

  • Send private message

5

Wednesday, May 6th 2009, 4:30pm

Thanks for the quick responses.
Let me try to be more specific. I have text data that is normally rendered into images on a java applet. In an effort to make the process easier on the client, I thought that a java servlet could create jpg images and the web browser load and render in the images. I have used KRPano in the traditional sense for displaying panoramas, and thought that I could use it display the images from the servlet. I'm not worried about KRPano displaying the images, but I'm having trouble interpretting the request from KRPano through the servlet. I'm thinking that since a url is set for the folder containing the images, I could set the url to the servlet location. Now when KRPano tries to get the images, I get an "access to abc123.jpg is denied" error, and the photo cannot be loaded. Also, the servlet does not apear to be getting the request at all.
I guess what I really need to know is: when KRPano goes to get the image, is it simply looking for a file on the local filesystem, or is it dowloading a file from a server using a get or post? I'm assuming it is the former and since I'm trying to use a url, it is throwing security errors, and hence, my dilema. Another way of putting this is: Is there is a way to stream files from a location on the internet by seting the url to a folder on a server?
Thanks again.

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

6

Wednesday, May 6th 2009, 7:00pm

Sorry I know nothing on servlets :(

but I do know that Krpano can open URL (http://www.blahblah.com/image.jpg) so I am sure that if you are getting an error accessing its probably because the file is protected? some servers don't allow other apps to access their folders directly, unless specified ?

Don't know any solution for Java, sorry :(

7

Wednesday, May 6th 2009, 9:12pm

Hi,

yes, dynamic content is possible,
e.g. just use an php app that serves the images,

I get an "access to abc123.jpg is denied"
this is an security error, it happens when trying to access data/files from a other domain (this is an flash limitation)

but the access can be allowed by creating a "crossdomain.xml" file on the other server,
and set the path to this crossdomain.xml in the krpano xml:

Source code

1
2
3
<security>
    <crossdomainxml url="http://..../crossdomain.xml" />
</security>


see also here:
http://krpano.com/docu/xml/#security

the crossdomain.xml can contain this for example to allow access from all other domains:

Source code

1
2
3
<cross-domain-policy xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
<allow-access-from domain="*"/>
</cross-domain-policy>


best regards,
Klaus

8

Saturday, May 9th 2009, 12:02am

ähnlicher Fehler?

Hallo Klaus!

Habe einen ähnlichen Fehler: (loading error: security error)

Ich binde den krpano-Viewer über ein CMS-Modul ein und gebe ihm eine vollständige URL zur XML-Datei des Panos an. (also dynamisch)

Der Pfad zur xml-Datei stimmt, und die Sache mit der Cross-Domain dürfte ja nicht sein, da alles auf der selben Domain läuft - oder liegt es daran, dass ich in 2 Unterverzeichnissen arbeite? (/vw2/cms/...) ..aber vielleicht ist es auch nur zu spät *blink*

Gruß und schönes WE!
Ralf

This post has been edited 1 times, last edit by "Tbird" (Sep 4th 2012, 8:30am)


9

Monday, May 11th 2009, 11:57am

RE: ähnlicher Fehler?

Hallo Klaus!

Habe einen ähnlichen Fehler: (loading error: security error)
http://www.visit-world.com/vw2/cms/front_content.php

Ich binde den krpano-Viewer über ein CMS-Modul ein und gebe ihm eine vollständige URL zur XML-Datei des Panos an. (also dynamisch)

Der Pfad zur xml-Datei stimmt, und die Sache mit der Cross-Domain dürfte ja nicht sein, da alles auf der selben Domain läuft - oder liegt es daran, dass ich in 2 Unterverzeichnissen arbeite? (/vw2/cms/...) ..aber vielleicht ist es auch nur zu spät *blink*

Gruß und schönes WE!
Ralf
Hi,

doch das ist auch das "Cross-Domain" Problem

in deiner HTML wird mit:

Source code

1
<base href="http://visit-world.com/vw2/cms/" />

die Adresse/Domain "visit-world.com" als "Basis" festgelegt,

bei der XML Datei wird aber auf "www.visit-world.com" verwiesen,
für Flash selber sind das aber leider zwei unterschiedliche Domains
("visit-world.com" und "www.visit-world.com")

eine Möglichkeit wäre hier entweder relative Pfade zu verwenden,
oder auch einfach im "Hauptverzeichnis" eine crossdomain.xml
zu erstellen, hier - http://www.visit-world.com/crossdomain.xml
dort sieht Flash von sich aus zuerst nach, dann ist in der krpano XML auch
kein <security> Eintrag notwendig,

Schöne Grüße,
Klaus