Skip to content

Instantly share code, notes, and snippets.

View gpx.js
/*
* GPX plugin, Copyright (C) 2011-2012 Pavel Shramov, Copyright (C) 2013 Maxime Petazzoni <maxime.petazzoni@bulix.org>
* Last commit included: 4/8/2013 (Merge pull request #8 from rkusa/bugfix) - https://github.com/mpetazzoni/leaflet-gpx/commits/master
* added for Maps Marker Pro v3.1: 22.1.2017: replaced clickable with interactive due to leaflet 1.0.2 update - https://github.com/Leaflet/Leaflet/pull/2838
* not used anymore with Maps Marker Pro 4.0!
*/
var _SECOND_IN_MILLIS = 1000;
var _MINUTE_IN_MILLIS = 60 * _SECOND_IN_MILLIS;
var _HOUR_IN_MILLIS = 60 * _MINUTE_IN_MILLIS;
L.GPX = L.FeatureGroup.extend({
View .htaccess
#info: allowing direct access to the listed files is intentional and needed for the plugin to run properly!
<FilesMatch "leafletmapsmarker-admin-tinymce\.php|start\.php|proxy\.php|leaflet-api\.php|leaflet-download\.php|leaflet-fullscreen\.php|leaflet-geojson\.php|leaflet-georss\.php|leaflet-geositemap\.php|leaflet-kml\.php|leaflet-qr\.php|leaflet-wikitude\.php|changelog\.php|tinymce_button_text\.php|tinymce_button_visual\.php">
Allow from all
</FilesMatch>
@robertharm
robertharm / gist:5cd1b9367d403e0584fd
Created Jan 20, 2016
XML Sitemap plugin integration
View gist:5cd1b9367d403e0584fd
add_action('sm_buildmap',array(&$this, 'lmm_add_kml_to_sitemap'));
function lmm_add_kml_to_sitemap(){
if(class_exists('GoogleSitemapGenerator')) {
global $wpdb;
$table_name_markers = $wpdb->prefix.'leafletmapsmarker_markers';
$table_name_layers = $wpdb->prefix.'leafletmapsmarker_layers';
$lmm_options = get_option( 'leafletmapsmarker_options' );
$sitemap = GoogleSitemapGenerator::GetInstance();
//info: add markers
View keybase.md

Keybase proof

I hereby claim:

  • I am robertharm on github.
  • I am robertharm (https://keybase.io/robertharm) on keybase.
  • I have a public key whose fingerprint is B5E8 883C 47D7 FA6B ED5A 01F2 96E0 A676 24F2 C56F

To claim this, I am signing this object:

@robertharm
robertharm / gist:5a469a4652a60f414696
Created Feb 13, 2015
leaflet / google maps addon
View gist:5a469a4652a60f414696
"enabled" == mapsmarkerjspro.google_maps_api_status && (google.load("maps", "3", {
other_params: "sensor=false" + mapsmarkerjspro.googlemaps_language + mapsmarkerjspro.googlemaps_base_domain + mapsmarkerjspro.googlemaps_libraries
}), L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: mapsmarkerjspro.maxzoom,
maxNativeZoom: 21,
tileSize: 256,
subdomains: "abc",
@robertharm
robertharm / showmap.php
Created Dec 2, 2012
adding javascript to footer
View showmap.php
<?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' );
@robertharm
robertharm / Wikitude-Wordpress-Webservice
Created Nov 5, 2010
Webservice for Wikitude/Wordpress-Integration #augmented-reality
View Wikitude-Wordpress-Webservice
<?php
/*
Name: Wikitude-Webservice for WordPress
Description: Provides a webservice for the augmented-reality-browser Wikitude (http://www.wikitude.org)
Requirements: self hosted WordPress and plugin WP-Geo (http://www.wpgeo.com/)
Webservice documentation URI: http://www.ihrwebprofi.at/wikitude-wordpress
Author: Robert Harm
Author URI: http://www.harm.co.at
Version: 1.0
Last Update: 23.10.2010