Delivery zones of your own

Show your own GeoJSON polygons and respond to clicks on them

View on GitHub
SDK 1.0.0

Five delivery zones drawn along Barcelona’s streets, each in its own colour and named on the map.

  • GeometriesModule.show takes your own polygons, not only geometry data boundaries, and draws a fill, a border and a label for each.
  • fill.palette deals out the colours in turn, and label.title reads each zone’s name.
  • A click handler alone turns on the hovered and clicked look, and receives the zone with your properties.
  • BaseMapModule catches the clicks that miss every zone, and those close the panel.

Related examples