Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" ?>
<Map bgcolor="rgb(255,255,255)" srs="+init=epsg:4326">
<Style name="NYC_Structures4326_style">
<Rule>
<PolygonSymbolizer>
<CssParameter name="fill">rgb(78,110,187)</CssParameter>
<CssParameter name="gamma">0.7</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke-width">0.96</CssParameter>
// command line test:
#!/usr/bin/env node
var SphericalMercator = require('./lib/tilelive/sphericalmercator.js')
var merc = new SphericalMercator({})
min_zoom = 1;
max_zoom = 2;
// if we have a merc extent
extent = [-20037508.34,-20037508.34,20037508.34,20037508.34];
@springmeyer
springmeyer / geocoder.js
Created July 6, 2011 17:54 — forked from wboykinm/geocoder.js
A javascript geocoder piggybacked on the GeoDjango Admin Project
{% block extrastyle %}
<style type="text/css">
#{{ id }}_map { width: {{ map_width }}px; height: {{ map_height }}px; }
#{{ id }}_map .aligned label { float:inherit; }
#{{ id }}_admin_map { position: relative; vertical-align: top; float: {{ LANGUAGE_BIDI|yesno:"right,left" }}; }
{% if not display_wkt %}#{{ id }} { display: none; }{% endif %}
.olControlEditingToolbar .olControlModifyFeatureItemActive {
background-image: url("{{ ADMIN_MEDIA_PREFIX }}img/gis/move_vertex_on.png");
background-repeat: no-repeat;
}
produces (but try changing bbox):
```
before: box2d(-180,-60,180,60)
after back: box2d(-20037508.34278924,-8399737.889818359,20037508.34278924,8399737.889818355)
after forward: box2d(-180,-60.00000000000001,180,59.99999999999999)
```
@springmeyer
springmeyer / mapnik_timer.patch
Created April 5, 2012 15:33 — forked from kunitoki/mapnik_timer.patch
boost::chrono in mapnik timer impl
diff --git a/include/mapnik/timer.hpp b/include/mapnik/timer.hpp
index 803f4d0..7247de1 100644
--- a/include/mapnik/timer.hpp
+++ b/include/mapnik/timer.hpp
@@ -29,12 +29,48 @@
#include <sstream>
#include <iomanip>
#include <ctime>
-#ifndef WIN32
-#include <sys/time.h> // for gettimeofday() on unix

UPDATE: The Vector Tiles are not being served at this time by Openstreetmap. Try later or a different provider (example) Services seem to have resumed

A simple test of extending the L.TileLayer to fetch geoJSON tiles from openstreetmap and render them with d3. This is probably not the most efficient way to do this, as we accept empty image tags (from the standard TileLayer) and use them as containers for the data/requests.

@springmeyer
springmeyer / install-pcp.sh
Last active August 22, 2018 15:09 — forked from johanstenberg92/install-pcp.sh
Install Performance Co-Pilot on Amazon Linux AMI
#!/bin/sh
set -eu
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root."
exit 1
fi
if !(type pcp 2>/dev/null;) then
codecov:
token: uuid # Your private repository token
url: "http" # for Codecov Enterprise customers
slug: "owner/repo" # for Codecov Enterprise customers
branch: master # override the default branch
bot: username # set user whom will be the consumer of oauth requests
ci: # Custom CI domains if Codecov does not identify them automatically
- ci.domain.com
- !provider # ignore these providers when checking if CI passed
# ex. You may test on Travis, Circle, and AppVeyor, but only need