3d building geometry viewer based on OpenStreetMap data
Clone or download
Latest commit cc24633 Nov 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build doc fixes Sep 1, 2018
dist new build Nov 8, 2018
docs doc fixes Sep 1, 2018
lib new build Oct 26, 2018
src fix for option 'disabled' Nov 8, 2018
test added bounds property to event targets Oct 26, 2018
.gitignore develop worker loading Jun 5, 2018
CHANGELOG.md fixed worker broken OBJ parameters Aug 10, 2018
LICENSE.md SkyWall removed Mar 28, 2018
README.md Update README.md Aug 1, 2018
build.js html doc generation Aug 30, 2018
config.json added bounds property to event targets Oct 26, 2018
jsdoc_conf.json added color valdation Sep 2, 2017
package-lock.json new build Oct 26, 2018
package.json new build Nov 8, 2018

README.md

OSM Buildings

OSM Buildings is a library for visualizing 3d building geometry.

Quick integration

Link all required libraries in your HTML head section. Files are provided in folder /dist.

<head>
  <link href="https://cdn.osmbuildings.org/4.0.0/OSMBuildings.css" rel="stylesheet">
  <script src="https://cdn.osmbuildings.org/4.0.0/OSMBuildings.js"></script>
</head>

<body>
  <div id="map"></div>

In a script section initialize OSM Buildings and add it to a DOM container.

  var osmb = new OSMBuildings({
    container: 'map',
    position: { latitude: 52.52000, longitude: 13.41000 },
    zoom: 16,
    minZoom: 15,
    maxZoom: 22
  });

  osmb.addMapTiles(
    'https://{s}.tiles.mapbox.com/v3/osmbuildings.kbpalbpk/{z}/{x}/{y}.png',
    {
      attribution: '© Data <a href="http://openstreetmap.org/copyright/">OpenStreetMap</a> · © Map <a href="http://mapbox.com">Mapbox</a>'
    }
  );

  osmb.addGeoJSONTiles('http://{s}.data.osmbuildings.org/0.2/anonymous/tile/{z}/{x}/{y}.json');

OSM Buildings server

There is also documentation of OSM Buildings Server side. See https://github.com/OSMBuildings/OSMBuildings/blob/master/docs/server.md