Skip to content

Instantly share code, notes, and snippets.

View wboykinm's full-sized avatar

Bill Morris wboykinm

View GitHub Profile
@bmcbride
bmcbride / LeafletToWKT.js
Last active June 7, 2022 02:17
Leaflet layer to WKT
function toWKT(layer) {
var lng, lat, coords = [];
if (layer instanceof L.Polygon || layer instanceof L.Polyline) {
var latlngs = layer.getLatLngs();
for (var i = 0; i < latlngs.length; i++) {
latlngs[i]
coords.push(latlngs[i].lng + " " + latlngs[i].lat);
if (i === 0) {
lng = latlngs[i].lng;
lat = latlngs[i].lat;
@tmcw
tmcw / modestmaps-tiling.py
Created December 4, 2012 00:05
ModestMaps-py Tiling with MapBox
# Requires ModestMaps to be installed
# Don't do this unless you have a very good reason, and a MapBox account,
# and you replace the 'examples' tileset with a tileset in your account.
import ModestMaps as MM
from ModestMaps.Geo import MercatorProjection, deriveTransformation
from ModestMaps.Providers import IMapProvider
from math import pi
class MapBox(IMapProvider):
@jacobandresen
jacobandresen / gist:836127
Created February 20, 2011 17:28
nonimatim openlayers jquery example
$(function() {
var geoCodeURL = "http://nominatim.openstreetmap.org/search";
var map = new OpenLayers.Map({ div: "map" });
var osm = new OpenLayers.Layer.OSM();
map.addLayers([osm]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(
new OpenLayers.LonLat( 9.2134, 55.3028).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
@endolith
endolith / Has weird right-to-left characters.txt
Last active May 18, 2024 22:32
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶