1

I have a cesium map web page I created which displays items on the map then I had another canvas that would put some special plotting of data that I had next to the map. I now need to turn that canvas into into own pop up window but it still needs to update based things in the cesium map web pape / javascript.

So now I am trying to have two html pages try to the access that same cesium map data that is stored in one .js file. However it seems like the new pop I added does not get updated any more by what was going on in the map.

Both html files I have links to that one .js file :

    <script src="client/js/cesium_map.js"></script>

But it seems like the pop up is not getting any data updates when something happends.

Is it ok to set things up to access the same .js file ?

In the cesium_map.js it is updating the map :

var viewer   = new Cesium.Viewer('cesiumContainer', { infoBox : false });
var scene    = viewer.scene;
var points   = scene.primitives.add(new Cesium.PointPrimitiveCollection());
// Create a billboard collection with two billboards
var billboards = scene.primitives.add(new Cesium.BillboardCollection());
var labels = scene.primitives.add(new Cesium.LabelCollection());
var primitives = scene.primitives;

Thanks for any ideas

user3470688
  • 539
  • 6
  • 21
  • 2
    Sharing same script is fine. But you know that in each html file your script will be executing anew in a separate context. How do you intend to share the data? – Vladimir M Oct 25 '16 at 22:00
  • That is what I need to know is how to share the data?? any idea??? Thanks – user3470688 Oct 26 '16 at 01:19
  • Then you might want to look at the following question: [Passing data between html pages](http://stackoverflow.com/questions/11609376/passing-data-between-html-pages) – Vladimir M Oct 26 '16 at 06:29

0 Answers0