Loading map style parts
Load map style parts as you need them, allowing for a faster initial map load
The map opens on the base map alone, and a toggle’s layer arrives the first time that toggle is switched on.
- The constructor’s
includelist names which style parts load up front, and it is empty here. TrafficIncidentsModule.get,TrafficFlowModule.getandTerrainModule.geteach pull their own part of the style in when first called, so the timing is the call site’s choice.- Passing
{ visible: true }to that samegetturns the module on as it loads, so there is no follow-upsetVisible.
Related examples
Bloom playground
Every bloom knob on one panel, including the scope that decides which part of the map is allowed to glow.
Playground
Traffic
Map Style
Plugins
Web
Cinematic city fly-by
Fly like a bird through eight cities and over five landscapes, banking round their landmarks and down their avenues, in twenty looks with skies, typefaces and effects of their own
Playground
Terrain and 3D
Map Style
Plugins
Web
Cinematic city orbit
Circle the Empire State Building through Midtown in eight looks, each mixing 3D buildings, bloom, depth of field and a map theme
Playground
Terrain and 3D
Map Style
Plugins
Web
GL Surfaces playground
Give the map's water, glaciers, forests, fields, sand, mud, paving and roads living textures, and tune their look live
Playground
Map Style
Plugins
Web