This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.TileLayer.Bing = L.TileLayer.extend({ | |
supportedTypes: ['Road', 'Aerial', 'AerialWithLabels'], | |
attributionTemplate: '<span style="display:inline-block">' + | |
'<a target="_blank" href="http://www.bing.com/maps/">' + | |
'<img src="{logo}" /></a><br><span>{copyrights}' + | |
'<a style="white-space: nowrap" target="_blank" '+ | |
'href="http://www.microsoft.com/maps/product/terms.html">' + | |
'Terms of Use</a></span></span>', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require 'fs' | |
pathutil = require 'path' | |
jade = require 'jade' | |
parseFiles = (dirname) -> | |
filenames = fs.readdirSync dirname | |
for file in filenames | |
continue if file.slice(0,1) is '.' | |
path = pathutil.join dirname, file | |
stats = fs.statSync pathutil.join dirname, path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch = require 'watch' | |
fs = require 'fs' | |
pathutil = require 'path' | |
jade = require 'jade' | |
watchDir = process.argv[2] || '.' | |
outFile = process.argv[3] || './templates.js' | |
namespace = process.argv[4] || 'Templates' | |
isJadeFile = (fileOrDir) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"identifier": "gmd:fileIdentifier/gco:CharacterString", | |
"parentidentifier": "gmd:parentIdentifier/gco:CharacterString", | |
"language": "gmd:language/gco:CharacterString", | |
"dataseturi": "gmd:dataSetURI/gco:CharacterString", | |
"languagecode": "gmd:language/gmd:LanguageCode", | |
"datestamp": "gmd:dateStamp/gco:Date or gmd:dateStamp/gco:DateTime", | |
"charset": "gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue", | |
"hierarchy": "gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeListValue", | |
"contact": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = @ | |
L.GeoJSON.d3 = L.GeoJSON.extend | |
initialize: (geojson, options) -> | |
@geojson = geojson # This needs to be a FeatureCollection | |
# unlike L.GeoJSON layer, this won't work unless GeoJSON is passed up-front | |
# Make sure there's an options object | |
options = options or {} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
You'll need something like this in your HTML: | |
<script src="http://d3js.org/topojson.v1.min.js"></script> | |
*/ | |
L.TopoJSON = L.GeoJSON.extend({ | |
addData: function(jsonData) { | |
if (jsonData.type === "Topology") { | |
for (key in jsonData.objects) { | |
geojson = topojson.feature(jsonData, jsonData.objects[key]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" style="height:100%; width:100%; padding:0; margin:0;"> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css"> | |
</head> | |
<body style="height:100%; width:100%; padding:0; margin:0;"> | |
<div id="map" style="height:100%; width:100%; padding:0; margin:0;"></div> | |
<script src="http://d3js.org/topojson.v1.min.js"></script> | |
<script src="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js"></script> | |
<script src="style.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* If you haven't included JSTS, it'll still work, but won't try and merge features | |
* across tile boundaries. You DO have to include: | |
* jQuery | |
*/ | |
var jsts = jsts || null; | |
L.Cache = L.GeoJSON.extend({ | |
mergeData: function mergeData(geojson) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import Column, Table, String, Text, Integer, types, ForeignKey | |
from sqlalchemy.orm import relationship | |
from ckan import model | |
from ckan.model import meta, Package | |
from shapely.geometry import asShape | |
import json | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* When creating a layer pass the ESRI Service's Export URL. e.g.: | |
* https://eia-ms.esri.com/arcgis/rest/services/20130301StateEnergyProfilesMap/MapServer/export | |
*/ | |
L.TileLayer.EsriImageExports = L.TileLayer.WMS.extend({ | |
getTileUrl: function (tilePoint) { | |
// Get the URL if this was just a WMS | |
var wmsUrl = L.TileLayer.WMS.prototype.call(this, tilePoint), | |
base = wmsUrl.split("?")[0], | |
params = wmsUrl.split("?")[1].split("&"); |
OlderNewer