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.

Graydon

Professional

  • "Graydon" started this thread

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

1

Friday, February 27th 2009, 3:25pm

request - load spot data from "other" source

I think it would be good if we could setup the map plugin so that spot data could be located in a separate location... such as a different xml file or data node.

I've played around with trying a simple <includeurl ="spotdata.xml" /> within the googlemap plugin structure... but it looks like it's ignored.

The concept would allow large amounts of map data to be split up over different files and loaded as needed... similar in idea to being able to specify at what zoom levels a spot shows up at... but more friendly to large amounts of data... of course, this would mean we'd have to be able to "reload" the map plugin and specify the new spot data as needed.

Graydon

2

Friday, February 27th 2009, 6:18pm

Hi,

normally it should be possible to put the spots in a external xml and include it,
be sure that there are not additional tags around the <spots>, then it should work,

e.g.

map:

Source code

1
2
3
4
<plugin ....>
   <include url="spots.xml" />
   ...
</plugin>


spots.xml:

Source code

1
2
<spot ... />
<spot ... />


best regards,
Klaus

Graydon

Professional

  • "Graydon" started this thread

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

3

Friday, February 27th 2009, 8:41pm

OK... that did it... *rolleyes*

I'd left the <krpano version... > </krpano> within the xml file.

In all other cases where I've used the includeurl, the <krpano> elements seemed to be ignored, or skipped over... so I didn't even think to remove that for this... should they NOT be there in all of the other cases as well?

Thank you

4

Saturday, February 28th 2009, 1:15am

the <krpano> ... </krpano> from a included xml is only ignored for includes from the inside a <krpano> tag,
I made this for easier including other panos

Graydon

Professional

  • "Graydon" started this thread

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

5

Monday, March 2nd 2009, 10:40pm

spot nodes as a data source

I've been playing around with some different configurations for my map and spot points... and I can figure out a long way of doing what I'd want... but wished there was a shorter way.

Somewhere on the googlemap plugin development (and associated image map plugin) I believe it would be good to be able to set the spot(s) information as an "attribute" instead of a series of subnodes.... with similar structure as the textfield plugin's html / css attributes.

In the textfield plugin, you can set html="data:htmldata" (same for css) and this allows you to set / change the html data source through an action (i.e. set(plugin[textfield].html,htmldata2) )

Two examples of how I'm looking at using this...

1. I've got a small park that's ~300 acres... on initial load, I'd like the spot data to be for general areas around the park. The park also has numerous hiking / biking trails... and I'd like the user to be able to click on a trail "start point" and have a new set of spot data loaded that is specific to that trail... and when needed, go back to the overview set of general spots.

2. Now we'll look at a large mixed-use development (shopping center) and apply the same concept... one set of data for the general grounds and area... other sets of data for specific areas.

The same concept could be applied to different situations.

I know previously I asked about spots being visible at different zoom levels... and I think that is still a good feature to add... but it wouldn't work in the scenarios I provided because the zoom level would be identical (especially in the park sample with some of the trails being pretty long).

It's not a "show-stopper"... because I know I can remove the map plugin and then load map2 plugin when i go to a different area... but... it's just a longer more intricate process.

Thanks for the consideration.

Graydon

6

Tuesday, March 3rd 2009, 12:15am

Hi,

there is also an additional way:

you can use actions to change dynamically a set of spots,
e.g.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<action name="set1">
    plugin[maps].resetspots();
    plugin[maps].addspot(spot1, ... );
    plugin[maps].addspot(spot2, ... );
    plugin[maps].addspot(spot3, ... );
    ...
</action>

<action name="set2">
    plugin[maps].resetspots();
    plugin[maps].addspot(spot1, ... );
    plugin[maps].addspot(spot2, ... );
    plugin[maps].addspot(spot3, ... );
     ...
</action>

Graydon

Professional

  • "Graydon" started this thread

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

7

Tuesday, March 3rd 2009, 12:22am

hmmm... I'll have to try that out.

edit added: sorry I missed that documentation about resetspots / addspot.. *rolleyes*

Thanks Klaus

Graydon

Professional

  • "Graydon" started this thread

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

8

Saturday, March 7th 2009, 4:27am

yeah... that does the trick... now if I could just setup something that took my kml file and pre-populated my addspot(...) *g*

... but for now, just need to work on content structure.

edited and added...

when adding new spots via "addspot"... also need to use the updatespots() function at the end of the action.

*thumbup*

Thanks

This post has been edited 1 times, last edit by "Graydon" (Mar 7th 2009, 5:54am)