Skip to content

Instantly share code, notes, and snippets.

var MyApp = {
addPlaceholders: function(props) {
// default configuration
var config = {
'class': 'placeholder' // apply CSS classes to an input displaying a placeholder
};
// if any properties were supplied, apply them to the config object
@johnkpaul
johnkpaul / gist:1935555
Created February 28, 2012 22:02 — forked from anonymous/gist:1935517
a guest on Feb 28th, 2012 - pastebin.com/1YXe6Nvd
//for (var i = 0; i < mapPoints.length; i++){
// for (var j = i + 1; j < mapPoints.length; j++){
// var p1 = mapPoints[i];
// var p2 = mapPoints[j];
// if (getDistance(p1, p2) < 0.1){ // If distance between points is greater than .1 km
// var midpoint = getMidpoint(p1, p2);
//
// mapPoints.push(midpoint);
// mapPoints.splice(i, 1);
// mapPoints.splice(j, 1);