Skip to content

Instantly share code, notes, and snippets.

@pgiraud
pgiraud / index.html
Last active January 18, 2023 09:53
Elevation Profile d3js
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
.axis line {
@pgiraud
pgiraud / index.html
Last active January 2, 2016 09:49
OpenLayers - "buttonclick" event triggered twice
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>Button click</title>
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css">
<link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css">
@pgiraud
pgiraud / index.html
Last active December 29, 2015 08:39
<a href="https://dl.dropboxusercontent.com/s/2j0qh015ed6i5xd/claquettes_avanc%C3%A9es_routine_part1.mov?dl=1&token_hash=AAGhtDDvM1-ICF3_6j6mrt-wayFdDbRZCdbQMqQ4cN3Hcg">vidéo</a>
function removeDiacritics (str) {
var defaultDiacriticsRemovalMap = [
{'base':'A', 'letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},
{'base':'AA','letters':/[\uA732]/g},
{'base':'AE','letters':/[\u00C6\u01FC\u01E2]/g},
{'base':'AO','letters':/[\uA734]/g},
{'base':'AU','letters':/[\uA736]/g},
{'base':'AV','letters':/[\uA738\uA73A]/g},
{'base':'AY','letters':/[\uA73C]/g},
<!DOCTYPE html>
<html>
<head>
<link href="http://code.jquery.com/mobile/latest/jquery.mobile.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
@pgiraud
pgiraud / index.html
Created August 7, 2013 09:25
OpenLayers doesn't parse an OGC response the same in Chrome or Firefox
<!DOCTYPE html>
<html>
<head>
<script src="http://www.openlayers.org/dev/OpenLayers.js"></script>
<script type="text/javascript">
function init(){
var format = new OpenLayers.Format.WMSGetFeatureInfo();
var features = format.read('<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ial="risques.pref.auvergne.gouv.fr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="risques.pref.auvergne.gouv.fr http://ids.craig.fr:80/wxs/ial/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=ial%3A63_140 http://www.opengis.net/wfs http://ids.craig.fr:80/wxs/schemas/wfs/1.0.0/WFS-basic.xsd"><gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy><gml:featureMember><ial:63_140 fid="63_140.49"><ial:id_proc>proc63_001</ial:id_proc></ial:63_140></gml:featureMember><gml:featureMember><ial:63_140 fid="63_140.1
@pgiraud
pgiraud / ExtendedRenderers.js
Last active September 24, 2024 14:50
OpenLayers 2 - Direction arrows along linestrings
/* Copyright Pierre GIRAUD, https://gist.github.com/pgiraud/6131715
* Published under WTFPL license. */
/**
* @requires OpenLayers/Renderer/SVG.js
*/
OpenLayers.Renderer.SVGExtended = OpenLayers.Class(OpenLayers.Renderer.SVG, {
eraseGeometry: function(geometry, featureId) {
this.removeArrows(geometry);
@pgiraud
pgiraud / index.html
Last active December 15, 2015 09:19
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
body {
text-shadow: 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em blue;
color: white;
}
</style>