Interactive base map buildings

Hover, click and paint single 3D buildings of the base map in Midtown Manhattan

View on GitHub
SDK 1.0.0

Each 3D building of the map style lights up under the pointer, takes the click colour when you select it and keeps a paint colour of its own.

  • A BaseMapModule click handler scoped to the buildings3D group reports the building under the pointer, its id and its properties. With it listening, the buildings turn the buildings3D.hover and buildings3D.click colours.
  • setBuildingColors gives the buildings you name by id a colour of their own, which they keep as their tiles reload. getBuildingIdAt names the building standing at a position, so two towers are coloured from their coordinates, not from ids read off a click.

Related examples