Thursday, February 07, 2013

3d Buildings in Google Maps


This is very impressive. The DTS Dallas Theological Seminary has used polygons to create the effect of 3d buildings on its campus map.

The effect is partly possible because of Google Map's 45 degree aerial view. This bird's eye view imagery is perfect for creating polygons for the roofs and the visible walls of building, which combined create the visual effect of a 3d building.

However it isn't as simple as just combining a few polygons. When the user changes the direction of the view in the 45 degree imagery the polygons will become distorted. Therefore the map developer has to create 4 different polygon image maps for each building and then use an event listener on the map to detect when a user rotates the view. When the map is rotated the building polygons for one point of view have to be removed and the correct polygons have to be loaded in their place for the new point of view.

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Just to clarify: we only have one polygon - the floor - for each building. When the map loads, we use the floor to draw walls upward and then draw a roof. When the map rotates, we just do the same thing again but from a different orientation. So we don't have to store 4 models, just 1 floor-plan and let the rest happen automatically.

    Thanks again for linking!

    ReplyDelete
  3. Hi John,

    Thanks for the clarifications.

    It's a great idea. I can't wait to try this with the Maps API.

    ReplyDelete