I posted this question on StackOverflow, but since there is no answer yet and as recommended in a comment, I'll ask it here too:

I'm programming a page where a 2D and a 3D map are side-by-side as in this ol-cesium example. It should be possible to change the basemap in 2D and 3D (independently of each other) and it should also be possible to turn other layers on and off in both 2D and 3D (independently of each other too).

As described on the ol-cesium page, ol-cesium synchronizes:

  • Map context (bounding box and zoom level);
  • Raster data sources;
  • Vector data sources in 2D and 3D;
  • Map selection (selected items);
  • Animated transitions between map and globe view.

I want to create my own synchronizer which just sync the moves (the map context) and no raster or vector layers. So I want to create my own synchronizer but don't know what to do, when I want to sync nothing but the map context. This is what I'm doing:

var ol3d = new olcs.OLCesium({
    map: map,
    target: 'map3d',
    createSynchronizers: function(map, scene) {
        return [
            // what to return here?
            new olcs.VectorSynchronizer(map, scene)

So at the moment I'm returning the VectorSynchronizer. I don't know what to return to just sync the map context and nothing else. There is no MapContextSynchronizer or somthing like that. So which synchronizer should I return though? Can I just return an empty array?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.