Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<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>OpenLayers with jQuery Mobile</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css">
@pgiraud
pgiraud / gist:1550772
Created January 2, 2012 13:57
Open Layers
var map = new OpenLayers.Map('map', {
controls: [
new OpenLayers.Control.Navigation(),
//new OpenLayers.Control.PanZoomBar(),
],
numZoomLevels: 10,
restrictedExtent: new OpenLayers.Bounds(-20037508.34 * 100,-20037508.34,20037508.34 * 100,20037508.34)
});
var osm = new OpenLayers.Layer.OSM(
what's happening springmeyer?
<springmeyer> TWG! here we go :)
Hi everyone - if you are here for the Technical working group meeting...
--> pierzen (~chatzilla@205.236.184.199) has joined #hot
<springmeyer> here is a basic agenda:
<pgiraud> hello all
<springmeyer> Agenda
- raise hand if present, state name, and interests (in just a few words)
- What existing software tools has HOT sponsored or encouraged
- how can we best/better coordinate software development priorities for HOTOSM needs?
@pgiraud
pgiraud / clientzoom_slow.js
Created September 21, 2012 09:09
OL ClientZoom & img loading
var map;
function init() {
map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'},
{serverResolutions: [1.40625,0.703125,0.3515625,0.17578125]}
);
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<meta name="content-language" content="fr" />
<style type="text/css">
</style>
</head>
@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>
@pgiraud
pgiraud / ExtendedRenderers.js
Last active April 4, 2024 19:09
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
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