Skip to content

Instantly share code, notes, and snippets.

View ndkv's full-sized avatar

Simeon Nedkov ndkv

View GitHub Profile
@ndkv
ndkv / README.md
Last active December 15, 2015 12:39
/dev/haag CartoDB + Google Maps

Demo of CartoDB's SQL querying capabilities through its JavaScript API. Example is based on stock example code.

This choropleth map shows municipalities with a population > 100000. See the unfiltered map here.

Dataset comes from Dutch census data as delivered by this PDOK WFS endpoint. Get the data as GeoJSON by downloading OGR and executing

ogr2ogr -f GeoJSON municipalities2011.geojson WFS:"http://geodata.nationaalgeoregister.nl/wijkenbuurten2011/wfs" gemeenten2011 -t_srs EPSG:4326

CartoDB also supports dynamic styling!

@ndkv
ndkv / index.html
Last active December 15, 2015 10:59
/dev/haag WMS example
<html lang="en">
<head>
<meta charset="utf-8" />
<title>OpenLayers WMS example</title>
<script type="text/javascript" src="http://waalweelde.ndkv.nl/lib/OpenLayers-2.12/OpenLayers.js"></script>
<script type="text/javascript">
function init() {
var map = new OpenLayers.Map('map', {
maxExtent: new OpenLayers.Bounds(10000.0, 305000.0, 280000.0, 619000.0),
projection: new OpenLayers.Projection("EPSG:28992")