Slide 1

Slide 1 text

Future of Vladimir Agafonkin 09.09.14

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

next version: 1.0

Slide 6

Slide 6 text

since the first release 3.5 years ago the biggest update

Slide 7

Slide 7 text

sometime 
 next month hopefully

Slide 8

Slide 8 text

born against ! all odds

Slide 9

Slide 9 text

no way you could do that

Slide 10

Slide 10 text

You’re wasting time

Slide 11

Slide 11 text

build an OPENLAYERS wrapper

Slide 12

Slide 12 text

born as a protest against bloat, clutter and complexity

Slide 13

Slide 13 text

top priorities: simplicity performance

Slide 14

Slide 14 text

1.0

Slide 15

Slide 15 text

evolution not revolution

Slide 16

Slide 16 text

animations & usability

Slide 17

Slide 17 text

fractional zoom: map.setZoom(12.67)

Slide 18

Slide 18 text

ballistic panning

Slide 19

Slide 19 text

better tile loading (less flickering)

Slide 20

Slide 20 text

better panning inertia

Slide 21

Slide 21 text

fixed gaps during zoom on Safari for Mac

Slide 22

Slide 22 text

smoother zoom on iOS Safari

Slide 23

Slide 23 text

popup fade out animation

Slide 24

Slide 24 text

vectors 2.0

Slide 25

Slide 25 text

Use SVG & Canvas on the same map

Slide 26

Slide 26 text

put vectors in custom panes

Slide 27

Slide 27 text

huge SVG layers performance boost: adding ~3x faster, takes ~2.5 less memory

Slide 28

Slide 28 text

huge Canvas layers performance boost: partial redraws, faster mouse events

Slide 29

Slide 29 text

Canvas layers now retina-enabled

Slide 30

Slide 30 text

solved all problems with MultiPolygon & MultiPolyline: no longer inherited from FeatureGroup

Slide 31

Slide 31 text

Polyline & Polygon Centroids

Slide 32

Slide 32 text

TileLayer

Slide 33

Slide 33 text

TileLayer split into GridLayer & TileLayer

Slide 34

Slide 34 text

GridLayer is the new TileLayer.Canvas

Slide 35

Slide 35 text

var tiles = L.tileLayer.canvas(); ! tiles.drawTile = function(canvas, tile, zoom) { var ctx = canvas.getContext('2d'); … // draw something }; old way

Slide 36

Slide 36 text

var tiles = L.gridLayer(); ! tiles.createTile = function(coords) { var tile = document.createElement('canvas'), ctx = canvas.getContext('2d'); … // do anything }; new way

Slide 37

Slide 37 text

Projections

Slide 38

Slide 38 text

No hardcoded projection hacks, all centralized in CRS

Slide 39

Slide 39 text

CRS defines everything: how tiles wrap, what are the bounds, distance measure, etc.

Slide 40

Slide 40 text

Proj4Leaflet FTW Thanks, Per!

Slide 41

Slide 41 text

Layers

Slide 42

Slide 42 text

all layers now inherited from Layer class less code, more consistency, good for plugins

Slide 43

Slide 43 text

Custom Pane Management

Slide 44

Slide 44 text

map.createPane(‘foobar’); ! L.tileLayer(url, {pane: ‘foobar’});

Slide 45

Slide 45 text

other performance improvements

Slide 46

Slide 46 text

LatLng construction 8x faster

Slide 47

Slide 47 text

faster Layer construction

Slide 48

Slide 48 text

huge FeatureGroup performance boost due to better event propagation mechanism

Slide 49

Slide 49 text

much better memory footprint for DOM & Leaflet events

Slide 50

Slide 50 text

obj.off(event, listener) 2x faster

Slide 51

Slide 51 text

…and many other bugfixes and improvements

Slide 52

Slide 52 text

best of all? it got smaller!

Slide 53

Slide 53 text

Uncompressed: 208.75 KB (-6798 bytes) Compressed: 116.91 KB (-5696 bytes) Gzipped: 31.71 KB (-1062 bytes) stable vs master

Slide 54

Slide 54 text

so why does it take so long?

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

Leaflet 0.7.3 is so good

Slide 58

Slide 58 text

Mapbox GL JS

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

incredibly complex technology and tons of code

Slide 61

Slide 61 text

to experiment, blow minds and create amazing map interactions

Slide 62

Slide 62 text

Leaflet will remain the go-to mapping library: dead simple, easy to use, works on all platforms, 
 tons of plugins, huge community, everyone knows it

Slide 63

Slide 63 text

Leaflet & Mapbox GL benefit from each other

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

thank you