Migrating to Vector Tiles

Lizzi Slivinski

Road Map

  1. The Case for Vector Tiles
  2. Developing a Migration Strategy

What are vector tiles?

VECTOR TILES

[Vector tiles] are packets of geographic data , packaged into pre-defined roughly-square shaped "tiles" for transfer over the web

Wikipedia

Why All the Excitement?

  1. New Technology/Features
  2. Resolves Longstanding Problems

Traditional Data Formats

  1. Image Tiles
  2. Vector Formats
    (ie. Geojson + Canvas/SVG/HTML)

Image Tiles



Interactivity

  • Immutable
  • Can’t interact with the data

Efficiency

  • Only load visible data

Geojson + SVG/Canvas/HTML


Interactivity

  • Dynamically styled
  • Access to data

Efficiency

  • Can overwhelm the browser


Vector Tiles



    Interactivity

  • Dynamic Styling
  • Access to Data

    Efficiency

  • Increased Preformance

Making the Switch

GOALS


  1. Enhance Performance
  2. Maintain Interactivity/UX
    • Dynamic Restyling
    • GIS Functions - (Point in polygon, nearest features)
    • Editing
  3. Minimize Reengineering—where possible

Weighing our options...

a) Update our code to
          use another library

b) Extend a plugin to
          meet our needs

Going Rogue—DIY Tiles


Leaflet.VectorTiles

  • Spatial Indexing
  • Methods for Efficient Restyling & fluid retrieval of geometry

Written using native Leaflet functions and in ~424 lines of unminified code

Editing w/Leaflet Draw

What Worked

  • Improved Performance
  • Interactivity
  • Low Switching Costs

What's Left

  • Resolve Quirks
  • Performance Enhancements
  • Implementation

Conclusions

  1. Migration is hard, but vector tiles are worth it
  2. Lots of great software out there
  3. Strategize based on the issues your project is currently experiencing and your goals for the future

THANK YOU KELVIN!!!

Lizzi Slivinski

NBT Solutions


QUESTIONS?