Skip to content

Instantly share code, notes, and snippets.

@ns-1m
ns-1m / osm2geo.js
Created May 3, 2012 03:38 — forked from tecoholic/osm2geo.js
OSM2GEO - A JS Converter to convert OSM to GeoJSON
/**************************************************************************
* OSM2GEO - OSM to GeoJSON converter
* OSM to GeoJSON converter takes in a .osm XML file as input and produces
* corresponding GeoJSON object.
*
* AUTHOR: P.Arunmozhi <[email protected]>
* DATE : 26 / Nov / 2011
* LICENSE : WTFPL - Do What The Fuck You Want To Public License
* LICENSE URL: http://sam.zoy.org/wtfpl/
*
@ns-1m
ns-1m / gist:2600185
Created May 5, 2012 05:51
Modified AgsDynamicLayer.js for Leaflet
//Class for interacting with ArcGIS Server image services
//Bill Dollins - Zekiah Technologies
//Modified from AgsDynamicLayer.js by DTSAgile
// http://blog.geomusings.com/2012/04/17/arcgis-image-services-and-leaflet/#more-2602
L.AgsImageLayer = L.Class.extend({
includes: L.Mixin.Events,
options: {
@ns-1m
ns-1m / RMShape.h
Created May 24, 2012 04:57 — forked from jan-christiansen/RMShape.h
Implementation of RMPath using CAShapeLayer
//
// RMShape.h
//
// Copyright (c) 2008-2012, Route-Me Contributors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
@ns-1m
ns-1m / app.js
Created May 28, 2012 10:15 — forked from tristen/app.js
Toggle on and off a layer
var baseMap = 'mapbox.world-bright'
var layers = [
baseMap
];
var loadMap = function(layers) {
var url = 'http://api.tiles.mapbox.com/v3/' + layers + '.jsonp';
wax.tilejson(url, function(tilejson) {
var map = new MM.Map('map', new wax.mm.connector(tilejson));
map.setCenterZoom({ lat: 39, lon: -98 }, 4);
@ns-1m
ns-1m / shell.html
Created May 31, 2012 10:51 — forked from elsewhat/shell.html
sapui5 beta - Shell component running on phonegap
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>sap.ui.ux3.Shell Test</title>
<script src="sapui5/resources/sap-ui-core.js"
type="text/javascript"
id="sap-ui-bootstrap"
@ns-1m
ns-1m / gist:2862176
Created June 3, 2012 06:04 — forked from plapier/gist:2044437
CSS/Sass Modal Dialog
<!-- HTML -->
<div class="modal-dialog-background">
<div class="modal-dialog">
<h1>Submit</h1>
<div class="inner-wrapper">
<p>Press submit to record your answers.</p>
</div>
<div class="buttons">
<button type="button" class="cancel">Cancel</button>
<button type="button" class="submit">Submit</button>
@ns-1m
ns-1m / scroller.js
Created June 8, 2012 23:29 — forked from kerrishotts/scroller.js
This library is intended to be similar to iScroll-lite in that it should be a relatively fast method of scrolling content without being horribly laggy or cause incorrect "clicks" to be registered.
/******************************************************************************
*
* SCROLLER
* Author: Kerri Shotts
* Version: 0.1 alpha
* License: MIT
*
* This library is intended to be similar to iScroll-lite in that it should be
* a relatively fast method of scrolling content without being horribly laggy
* or cause incorrect "clicks" to be registered.
@ns-1m
ns-1m / index.html
Created June 9, 2012 02:43 — forked from elsewhat/index.html
PhoneGap and SAPUI5 index file
<html>
<head>
<title></title>
<script type="text/javascript" charset="utf-8" src="phonegap/cordova-1.6.0.js"></script>
<script id="sap-ui-bootstrap"
type="text/javascript"
src="sapui5/resources/sap-ui-core.js"
data-sap-ui-theme="sap_platinum"
@ns-1m
ns-1m / scroller_example
Created June 9, 2012 06:57
Scoller example
#outer
{
Position: relative;
Top: 10px;
Left: 10px;
Width: 300px;
Height: 380px;
Overflow:hidden;
Border: 3px solid #000;
Background-Color: #145;
@ns-1m
ns-1m / leaflet-button-control.js
Created June 15, 2012 09:07 — forked from ejh/leaflet-button-control.js
Leaflet control button example
// How to use it?
// OnAdd() is called when you use:
// var footButton = new L.Control.Button(footButtonOpts).addTo(map);
// It is passed the map object to which your control is being added.
// The third parameter passed to L.DomEvent.addListener is the context ('this' keyword) which
// you wish to have in the callback (second parameter).
// I still don't know how to use it.