OpenLayers

Basic Concepts

Map

View

Layers

ol.layer.Layer

ol.source.Source

Yo! Let's add some layers!

Wusup with OSM?

Debate

Let's write some CODE!

Shared Workers

/* App */
const myWorker = new SharedWorker('script.js');

myWorker.port.onmessage
        .port.postMessage

/* SharedWorker */ 


// self -- is the workers-scope
onconnect = function (e) {
  var newPort = e.ports[0];
  
  newPort.onmessage = function (e) {
   //Incoming message
  }

  newPort.postMessage('Outgoing message');
}

Hint: search for map events in Docs

Q&A

Next episode on the Maps & Friends show...

OpenLayers

By Pava

OpenLayers

  • 312
Loading comments...

More from Pava