4 posts / 0 new
Last post
Adding more than one map per page

Hi there,
I am using StatPlanet Plus in a WordPress installation. I have 3 maps generated from 3 separate datasets on 3 separate WordPress pages. Data and .swf files are stored in 3 different folders (/map1  /map2 etc) and I added conditional code to generate the correct base url for each map. All works well.
Now, I need to put all 3 maps on the same page and the "system" used above does not apply/work.
Is it possible to use a single base url for 3 different data files? Can you change the filename of data.csv so that you could have a number of data files in a single folder/base url location?
I have looked around the forums and the settings files and could not spot anything, so any help you could provide would be very useful.
Thanks in advance.

StatSilk's picture

Hi Simon,

If you are using StatPlanet Plus, it is possible to specify the name of the data and settings file in the HTML code (this is not a feature in StatPlanet). If you are using StatPlanet Plus, you will find in the 'web' folder the file 'StatPlanet_options.html'. This includes the HTML code for specifying the names of these files as follows:

flashvars.data = "data.csv";
flashvars.settings = "settings.csv";
This should make it possible to have multiple maps with the same base URL but different file names.
I hope that helps.

Thanks for your quick reply Frank and for pointing me in the right direction (and yes, I am using StatPlanet Plus)
Could you be a bit more specific please about how this might be achieved?
I currently have 3 maps - displaying on 3 different pages, with 3 folders (each containing the .swf, data.csv, settings.csv and the StatPlanet_options.html files amongst others!)
Now, I would like 3 maps on one page, so I have assumed that I:

  • set the base URL for the (single) page
  • rename the data.csv and settings.csv files for each map (e.g. data2.csv, data3.csv)
  • place these data and settings files in the base URL location (so this would contain data.csv, data2.csv, data3.csv ...etc and the StatPlanet files for the first map)
  • amend each StatPlanet_options.html file (still in separate folders containing the .swf) to point to the new data/settings.csv locations
  • Embed .swf files in page using folder location (e.g. .../map2/StatPlanet.swf)

..but this doesn't work!
It would be really great if you could explain the steps as I am struggling!

StatSilk's picture

Hi Simon,
Sorry to hear that it didn't work.
I put an example here along with the source code:
This example sets the base url for each instance of StatPlanet (rather than setting the location of the data file). So you can just keep the complete set of StatPlanet files in each folder, without modifying the names of the data file. (So this is possible after all.)