Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / showmap.php
Created December 2, 2012 17:13
<?php
//info: remove filter from SEO Friendly Images for compatibility reasons
include_once( ABSPATH . 'wp-admin' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'plugin.php' );
if (is_plugin_active('seo-image/seo-friendly-images.php') ) {
if ( function_exists( 'seo_friendly_images_install' ) ) {
remove_filter('the_content', 'seo_friendly_images', 100);
}
}
global $wpdb;
$lmm_options = get_option( 'leafletmapsmarker_options' );
@walkermatt
walkermatt / osgb_map.js
Created July 2, 2012 18:25
Leaflet Map using Proj4Leaflet to display a projected TMS base map from MapProxy
// Bounding box of our TMS that define our area of interest
var bbox = [-600000, -300000, 1300000, 1600000];
// Resolutions of our TMS that the tiles will be displayed at calculated so
// that at resolution 0 the bounds fit one 256x256 tile: (maxx - minx)/256
var res = [7421.875, 3710.9375, 1855.46875, 927.734375];
// Define the Proj4Leaflet coordinate reference system base on British National Grid
var crs = L.CRS.proj4js(
'EPSG:27700',
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@mourner
mourner / TileLayer.Common.js
Created February 11, 2012 23:11
Leaflet shortcuts for common tile providers
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core?
L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
}
});
(function () {
@franz-josef-kaiser
franz-josef-kaiser / onload.init.js
Created January 16, 2012 16:03
Window onLoad triggers for all browsers
/**
* Window onLoad Init triggers
* Use to load all functions you need on window.onload w/o the need for jQuery
*
* @author Dean Edwards/Matthias Miller/John Resig
* @link http://stackoverflow.com/a/3144510/376483
*/
function init()
{
// quit if this function has already been called