![]() |
|
|||||||
| WorldWind General General WorldWind discussions.
Note: This is not a technical support forum. It is for World Wind topics that don't fit into other categories. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Super Member
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
![]() |
Hi,
I display ESRI shape files on WW, and now my users want to be able to change the colors of the shapes by changing cell values in an external excel spreadsheet. Can anyone layout a plan on how to do this for me? What mechanisms does WW have available to look into an excel spreadsheet? This would be done during a status briefing, so the user would want to update the cell, go over to WW, refresh the view, and see the new color. Any help on this would be greatly appreciated. Thanks, James Last edited by James_In_Utah; 07-18-2006 at 12:43 AM. |
|
|
|
|
|
#2 |
|
What?
Join Date: Apr 2005
Location: San Francisco, California
Posts: 2,461
![]() |
Write a macro that writes an xml file with the updated color.
You can't just refresh the view in WW either, you have to restart or reload Earth from the file menu for the changed xml to take effect. |
|
|
|
|
|
#3 |
|
Super Member
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
![]() |
Would turning off the Shapes from the Layer Manager and turning it back on do the same thing? These are managers and non-techs doing the briefings, so I need to make this realitively seemless. Exporting the XML should be an easy macro to do, but how do I get WW to use this XML for the colors of the shapes? Also, can I go into the code and add the functionality to read the XML and redisplay the correct colors to the F5 function in the main app? Would I be better off writing a pluggin to do this? Thanks, for the suggestion....
James |
|
|
|
|
|
#4 |
|
What?
Join Date: Apr 2005
Location: San Francisco, California
Posts: 2,461
![]() |
If you want seamless then WW isn't for you.
![]() The xml from the macro would replace the xml file for the shapefile layer in the WW directory, but with different numbers in the appropriate places. I don't know how to change the reload behavior; add an issue on the bug tracker. Is the color that big of a deal? Just make your best guess about what color they will like and tell them changing it isn't an option. |
|
|
|
|
|
#5 |
|
Super Member
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
![]() |
Color is the big deal. Green means good, yellow means not so good, and red means really bad. They would like to do some what if this was green and that was red and this is what happens when they all go red type stuff.
|
|
|
|
|
|
#6 |
|
What?
Join Date: Apr 2005
Location: San Francisco, California
Posts: 2,461
![]() |
This will be very slow for that.
Shapefiles get turned into image layers too, so changing colors on the fly via a plugin would be hard to do as well. |
|
|
|
|
|
#7 |
|
Super Member
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
![]() |
It takes about 30 seconds on my laptop to load up all of the shapes, with a default color of yellow. Before the presentation the colors would be set to the current actual values. During the brief, someone may want to see what the situation would be if one ore two, or a small group changed states. It shouldn't take that long to turn one off, change the color, and then turn it back on, even if it means reloading the whole shape with a different color. At least I hope that's the case.
Thanks, James |
|
|
|
|
|
#8 |
|
Worldwind Developer
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
![]() |
Hey James ok i suggest you fake it.Make separate Shape XML's with different colours and put them as view only one true and switch between them.
Like talk and say if this changes layer2 is waht it will look like and so on ... We are working on supporting different KML colours and periodically refreshing shapefiles but we are not there yet. Do you think your executives can hire us a developer/pay you to learn some C#. [Dumb plug - pay apogee to develop some coloring functionality] |
|
|
|
|
|
#9 |
|
Super Member
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
![]() |
Thanks for the suggestion. All of my shapes add up to about 20MB, so if I represent all of them with Red, Green, and Yellow, I'm only talking about 60MB. Then it is only a matter of manipulating the XML file. I've got enough C++ and C# experience to be able to handle that I think. I'll be sure to let you know how this works out!
Thanks, James |
|
|
|
|
|
#10 |
|
Worldwind Developer
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
![]() |
Hi james u dont have to triplicate the data .. just change the styling in the XML.
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 3D ESRI Shapes? | James_In_Utah | WorldWind General | 1 | 02-04-2006 11:06 PM |