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
import re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
try: | |
import settings | |
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS |
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
var map = new L.Map('map'); | |
var mapquestUrl = 'http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', | |
subDomains = ['otile1','otile2','otile3','otile4'], | |
mapquestAttrib = 'Data, imagery and map information provided by <a href="http://open.mapquest.co.uk" target="_blank">MapQuest</a>, | |
<a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> and contributors. | |
var mapquest = new L.TileLayer(mapquestUrl, {maxZoom: 18, attribution: mapquestAttrib, subdomains: subDomains}); |
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
var map = new L.Map('map'); | |
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/API-KEY/997/256/{z}/{x}/{y}.png', | |
cloudmadeAttrib = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade', | |
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttrib}); |
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
function getPhoto(mealId, sourceType, saveOnSuccess) { | |
var $mealDiv = $('#log-meal-' + mealId); | |
var $mealImg = $mealDiv.find('.log-meal-photo-button img'); | |
var $quickpicStatus = $('#mobile-quickpic-link span'); | |
function resetQuickPicStatus() { | |
$quickpicStatus.html('').addClass('icon-camera'); | |
} | |
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
/* | |
* Here the 'inspiration': http://goo.gl/OKL9A | |
* Adapted from: http://psha.org.ru/leaflet/Google.js | |
* Demo: http://psha.org.ru/leaflet/bel.html | |
* This code works well with jquerymobile: | |
* the original code maintain a div.height of 0 for the internal google container | |
* REMARKS: this | |
* NOTE: jQuery required! | |
*/ |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<meta content='text/html, charset=UTF-8' http-equiv='Content-Type' /> | |
<meta content='IE=7,IE=8,IE=9' http-equiv='X-UA-Compatible' /> | |
<meta content='initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport' /> | |
<style type="text/css"> | |
@import url("http://code.leafletjs.com/leaflet-0.3.1/leaflet.css"); | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<meta content='text/html, charset=UTF-8' http-equiv='Content-Type' /> | |
<meta content='IE=7,IE=8,IE=9' http-equiv='X-UA-Compatible' /> | |
<meta content='initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport' /> | |
<style type="text/css"> | |
@import url("http://code.leafletjs.com/leaflet-0.3.1/leaflet.css"); | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
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
<html><head><title>Geocommons and Leaflet JS</title> | |
<!-- Leaflet CSS --> | |
<link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist/leaflet.css" /> | |
<!--[if lte IE 8]><link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist>/leaflet.ie.css" /><![endif]--> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | |
<!-- Leaflet JavaScript --> | |
<script type="text/javascript" src="CloudMade-Leaflet-404b097/dist/leaflet.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
/************************************************************************** | |
* 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/ | |
* |
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
// | |
// 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 |