Skip to content

Instantly share code, notes, and snippets.

View webmappergists's full-sized avatar

Webmapper webmappergists

View GitHub Profile
@webmappergists
webmappergists / README.md
Last active September 6, 2016 11:48
Optimise an interactive choropleth map: TopoJSON and OpenLayers 2

This example shows various ways to optimise an interactive choropleth map for fast delivery:

  • Create a custom OpenLayers build instead of using the default one
  • Use TopoJSON to encode the geometry
  • Reduce the number of decimals in geographic coordinates
  • Serve map tiles from multiple sub-domains

This map is created for a blog post on Webmapper.

Cheers,

@webmappergists
webmappergists / README.md
Last active August 29, 2015 14:07
TopoJSON: mesh and arcs

This example shows the make up of a TopoJSON file:

  • Mesh: individual lines that combined make up a geographic area
  • Arcs: nodes where lines coincide

This map is created for a blog post on Webmapper.

Cheers,

Edward

@webmappergists
webmappergists / buildings.js
Last active March 24, 2018 13:28
3D Valkenburg (2015) in OSMBuildings
This file has been truncated, but you can view the full file.
var BldgJSON = {
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "building_type": "overig", "height": 9 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 5.823759, 50.865621 ], [ 5.823827, 50.86573 ], [ 5.823919, 50.865707 ], [ 5.823851, 50.865598 ], [ 5.823759, 50.865621 ] ] ], [ [ [ 5.823827, 50.86573 ], [ 5.823759, 50.865621 ], [ 5.823759, 50.865621 ], [ 5.823827, 50.86573 ], [ 5.823827, 50.86573 ] ] ], [ [ [ 5.823919, 50.865707 ], [ 5.823827, 50.86573 ], [ 5.823827, 50.86573 ], [ 5.823919, 50.865707 ], [ 5.823919, 50.865707 ] ] ], [ [ [ 5.823851, 50.865598 ], [ 5.823919, 50.865707 ], [ 5.823919, 50.865707 ], [ 5.823851, 50.865598 ], [ 5.823851, 50.865598 ] ] ], [ [ [ 5.823759, 50.865621 ], [ 5.823851, 50.865598 ], [ 5.823851, 50.865598 ], [ 5.823759, 50.865621 ], [ 5.823759, 50.865621 ] ] ], [ [ [ 5.823759, 50.865621 ], [ 5.823827, 50.86573 ], [ 5.823919, 50.865707 ], [ 5.823
@webmappergists
webmappergists / README.md
Last active August 29, 2015 14:26
Kinderen per 5PPC-gebied: choropleet obv open data
@webmappergists
webmappergists / README.md
Last active November 28, 2015 18:53
Leaflet.js showing TMS in RD and WFS in WGS-84

This example shows how to use the popular Leaflet.js v.0.7.5 interactive mapping library with OGC-compliant geographic web service (in this case TMS) that comes in the Dutch reference system: Rijksdriehoekstelsel (RD), Amersfoort New (EPSG:28992) together with a WFS that returns GeoJSON in WGS-84.

Cheers,

Edward @emacgillavry

@webmappergists
webmappergists / README.md
Last active December 7, 2015 10:51
Leaflet.js showing TMS and single-tile WMS in RD and WFS in WGS-84

This example shows how to use the popular Leaflet.js v.0.7.5 interactive mapping library with OGC-compliant geographic web services (in this case TMS and single-tile WMS) that both come in the Dutch reference system: Rijksdriehoekstelsel (RD), Amersfoort New (EPSG:28992) together with a WFS that returns GeoJSON in WGS-84. Leaflet natively supports tiled WMS. Using the PTV plugin for Leaflet, we can now include single-tile WMS services too!

Cheers,

Edward @emacgillavry

@webmappergists
webmappergists / README.md
Last active November 30, 2015 16:16
Leaflet 1.0.0 showing TMS and single-tile WMS in RD and WFS in WGS-84

This example shows how to use the popular Leaflet.js v.1.0.0 beta 2 interactive mapping library with OGC-compliant geographic web service (in this case TMS) that comes in the Dutch reference system: Rijksdriehoekstelsel (RD), Amersfoort New (EPSG:28992) together with a WFS that returns GeoJSON in WGS-84.

Cheers,

Edward @emacgillavry