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.

  • 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).

  • 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 :)

  • 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*

  • 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.

  • 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 :(

  • 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:

    Code
    <security>
        <crossdomainxml url="http://..../crossdomain.xml" />
    </security>

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

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

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

    best regards,
    Klaus

  • 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

    Edited once, last by Tbird (September 4, 2012 at 8:30 AM).

  • 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:

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


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

    bei der XML Datei wird aber auf "http://www.visit-world.com" verwiesen,
    für Flash selber sind das aber leider zwei unterschiedliche Domains
    ("visit-world.com" und "http://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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!