combobox to zoom to various hotspots?

  • Hi,

    I have a large flat multires image of a map and there are hotspots placed in various positions on the map that when clicked load the 360 degree image of that location.

    What I'd also like include is a combobox on the main map image with all the location names listed. Choosing a location name would pan and zoom right in to the hotspot located on the map. Is that possible at all?

    I've been reading up on the combobox and noticed the fovtype examples so it seems that more things other than just loading an image is possible. Perhaps incorporate Lookto or Lookat?

    This is the type of code I currently use for comboboxes. Not exactly 'wizardry' *wink*


    <action name="fillcombobox">
    additem('Image 01', loadpano(001.xml,null,MERGE,BLEND(1)); );
    additem('Image 02', loadpano(002.xml,null,MERGE,BLEND(1)); );
    additem('Image 03', loadpano(003.xml,null,MERGE,BLEND(1)); );
    </action>


    Many thanks,

    Andrew

  • Hi Jarredja,

    Thanks for the reply.

    I can't seem to get that work although the code I included previously was just an example of what I use to use.

    The current xml file has 22 hotspots so I would just like the viewer to look at the map zoomed out and see all the hotspot markers, then they can use the combobox to pick a marker name which results in the image panning and zooming in to the chosen hotspot. This would show them exactly where the hotspot is on the map and then they can click on it to load the panorama.

    Something like this but doesn't work.

    Code
    additem('Image 01', looktohotspot(marker15); );


    Thanks,

    Andrew

  • Hi,

    just as note - that code:

    Code
    additem('Image 01', looktohotspot(marker15); );


    will only work when that code was called from an event from the combobox plugin (e.g. typically the onloaded event),

    when the code was called from somewhere else (onstart event, another plugin event, ...), then the full path to the combobox plugin need to be used, e.g.:

    Code
    plugin[combobox1].additem('Image 01', looktohotspot(marker15); );

    best regards,
    Klaus

  • Thanks for the input Klaus.

    This is what the new code looks like below. The first time I tried it I was kind of expecting it to pan and zoom straight to the chosen hotspot but unfortunately the map image stays zoomed out as when it was loaded even after choosing some of the options.

    Not too sure what I've done wrong after reading your post?



    I also tried it with the

    plugin[combobox].additem('Choose a Location', loadpano(); );

    removed but no joy.

    Thanks

    Andrew

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!