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