-
Notifications
You must be signed in to change notification settings - Fork 75
Online OSM 3D buildings
nutiteq edited this page Dec 21, 2012
·
8 revisions
HelloMap includes a layer Polygon3DOSMLayer which downloads OpenStreetMap buildings in 3D from a server. It is very basic 3D: it takes height value of buildings which have it set, and uses some average height for all the other buildings. No roof shapes, colors or textures. Hopefully one day OSM will has considerable amount of these tags also.
Application code:
// OSM 3D building layer, visible from zoom 15
Polygon3DStyle polygon3DStyle = Polygon3DStyle.builder().setColor(Color.BLACK | 0x40ffffff).build();
StyleSet<Polygon3DStyle> polygon3DStyleSet = new StyleSet<Polygon3DStyle>(null);
polygon3DStyleSet.setZoomStyle(15, polygon3DStyle);
Polygon3DOSMLayer osm3dLayer = new Polygon3DOSMLayer(new EPSG3857(), 0.500f, 200, polygon3DStyleSet);
mapView.getLayers().addLayer(osm3dLayer);