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
(ns gist.conduit | |
(:use [net.cgrand enlive-html tagsoup])) | |
; The implementations of conduit and defconduit are modified versions of | |
; the macros template and deftemplate from the guts of Enlive. | |
; They're named 'conduit' because the selectors and transformations serve as a | |
; channel between the scaffold of HTML and some data provided as an argument. | |
; Tagsoup is used to parse a list of HTML nodes from a specified input file at runtime. |
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
(ns leaflet-helloworld | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true])) | |
(defn map-view [_ owner] | |
(reify | |
om/IRender | |
(render [_] | |
(dom/div #js {:id "the-map"} nil)) | |
om/IDidMount |
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
(ns postgis | |
(:require [clj-json.core :as json]) | |
(:use korma.core korma.db korma.sql.engine)) | |
(defn intersects [first-geom second-geom] | |
"An extended Korma predicate that uses the PostGIS function ST_Intersects." | |
(sql-func "ST_Intersects" first-geom second-geom)) | |
(defn from-wkt [wkt] | |
"Create a PostGIS geometry with geographic SRID from WKT using ST_GeomFromText." |
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
window.Mapnificent = (function (window, document, $, undefined) { | |
var getOSMMapType = function () { | |
return new google.maps.ImageMapType({ | |
getTileUrl: function (coord, zoom) { | |
return "http://tile.openstreetmap.org/" + zoom + "/" + coord.x + "/" + coord.y + ".png" | |
}, | |
tileSize: new google.maps.Size(256, 256), | |
isPng: true, | |
maxZoom: 18, | |
name: "OSM" |
NewerOlder