Skip to content

L.TileLayer.Websockets plugin #2

@knutole

Description

@knutole

Continuing discussion here, from Leaflet#4420.

We're planning to create a L.TileLayer.Websocket class, that requests tiles over websockets, instead of http requests. I realise this is a bit of an undertaking, so I'm just checking in to perhaps get some advice and heads-up on possible caveats. (Also, if anyone has done any work in this direction already, let me know, can't seem to find anything anywhere.)

Rationale for the plugin is that we need to request small tiles at a much higher rate than what browser http request limits permit (doing animation with tiles at >10fps). We run our own tileserver, which will accept websocket requests for tiles.

Outline

  • use v1.0.0-beta.2
  • extend L.TileLayer to L.TileLayer.Websockets
  • fallback on L.TileLayer if websockets are unsupported (caniuse/websockets).
  • replace tile.src (code) with websocket request

Any advice, input or encouragement is greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions