Skip to content

Commit

Permalink
Merge branch '2.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Mar 27, 2012
2 parents fb1a49e + eb74d93 commit d1d5ab9
Show file tree
Hide file tree
Showing 52 changed files with 188 additions and 62 deletions.
2 changes: 1 addition & 1 deletion examples/all-overlays-google.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body onload="init()">
<h1 id="title">All Overlays with Google and OSM</h1>
<div id="tags">
overlay, baselayer, google, osm, openstreetmap
overlay, baselayer, google, osm, openstreetmap, light
</div>
<p id="shortdesc">
Using the Google and OSM layers as overlays.
Expand Down
2 changes: 1 addition & 1 deletion examples/all-overlays.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<body onload="init()">
<h1 id="title">OpenLayers Overlays Only Example</h1>
<div id="tags">
overlay, baselayer
overlay, baselayer, light
</div>
<p id="shortdesc">
Demonstrates a map with overlays only.
Expand Down
2 changes: 1 addition & 1 deletion examples/attribution.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<h1 id="title">Attribution Example</h1>

<div id="tags">
copyright, watermark, logo, attribution
copyright, watermark, logo, attribution, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/bing-tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h1 id="title">Basic Bing Tiles Example</h1>

<div id="tags">
bing tiles
bing tiles, light
</div>

<div id="shortdesc">Use Bing with direct tile access</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/bing.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<h1 id="title">Bing Example</h1>

<div id="tags">
Bing, Microsoft, Virtual Earth
Bing, Microsoft, Virtual Earth, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/boxes-vector.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<h1 id="title">Boxes Example Vector</h1>

<div id="tags">
box, vector, annotation
box, vector, annotation, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/buffer.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<h1 id="title">Buffer Example</h1>

<div id="tags">
buffer, performance, tile
buffer, performance, tile, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/click.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h1 id="title">Click Event Example</h1>

<div id="tags">
click control, double, doubleclick, double-click, event, events,
propagation
propagation, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/clientzoom.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="clientzoom.js"></script>
<style>
.olControlAttribution {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<h1 id="title">Custom Control Example</h1>

<div id="tags">
control, panel, rectangle
control, panel, rectangle, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<h1 id="title">OpenLayers Example</h1>
<div id="tags">simple, basic</div>
<div id="tags">simple, basic, light</div>
<p id="shortdesc">
Demonstrate a simple map with an overlay that includes layer switching controls.
</p>
Expand Down
2 changes: 1 addition & 1 deletion examples/geojson.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<h1 id="title">GeoJSON Example</h1>

<div id="tags">
JSON, GeoJSON
JSON, GeoJSON, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/google-static.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<h1 id="title">Google (Static Maps API) Grid Layer Example</h1>
<div id="tags">
Google, grid, static, GMaps
Google, grid, static, GMaps, light
</div>
<p id="shortdesc">
Using the Google Static Maps API with a Grid Layer.
Expand Down
2 changes: 1 addition & 1 deletion examples/google-v3-alloverlays.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body onload="init()">
<h1 id="title">Google (v3) allOverlays Layer Example</h1>
<div id="tags">
Google, overlay
Google, overlay, light
</div>
<p id="shortdesc">
Demonstrate use the Google Maps v3 API with allOverlays set to true on the map.
Expand Down
2 changes: 1 addition & 1 deletion examples/google-v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body onload="init()">
<h1 id="title">Google (v3) Layer Example</h1>
<div id="tags">
Google, api key, apikey
Google, api key, apikey, light
</div>
<p id="shortdesc">
Demonstrate use the Google Maps v3 API.
Expand Down
2 changes: 1 addition & 1 deletion examples/graphic-name.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<body onload="init();">
<h1 id="title">Named Graphics Example</h1>
<div id="tags">
vector, named graphic, star, cross, x, square, triangle, circle, style
vector, named graphic, star, cross, x, square, triangle, circle, style, light
</div>
<p id="shortdesc">
Shows how to use well-known graphic names.
Expand Down
2 changes: 1 addition & 1 deletion examples/gutter.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<h1 id="title">Gutter Example</h1>

<div id="tags">
gutter, quality, tile
gutter, quality, tile, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/late-render.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<h1 id="title">Late Rendering</h1>

<div id="tags">
creation, render, div
creation, render, div, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/layer-opacity.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<h1 id="title">Layer Opacity Example</h1>

<div id="tags">
opacity, transparent, transparency
opacity, transparent, transparency, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/layerLoadMonitoring.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<h1 id="title">Layer Load Monitoring Example</h1>

<div id="tags">
monitor, loading
monitor, loading, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/layerswitcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<h1 id="title">Layer Switcher Example</h1>

<div id="tags">
tree, layerswitcher, reposition
tree, layerswitcher, reposition, light
</div>

<p id="shortdesc">
Expand Down
35 changes: 35 additions & 0 deletions examples/light-basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!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>OpenLayers Light - Basic Popups</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../OpenLayers.light.debug.js"></script>
<script src="light-basic.js"></script>
</head>
<body onload="init()">
<h1 id="title">OpenLayers Light - Basic Popups</h1>
<div id="tags">
light, vector, feature, popup
</div>
<p id="shortdesc">
A basic use case example using the OpenLayers.light version of the library.<br>
Shows popup info bubble when hovering over features on the map
</p>

<div id="map" class="smallmap"></div>

<div id="docs">
<p>
This example uses OpenLayers.light.js to display features and show
popup info bubbles when the feature is hovered over.
</p>
See the <a href="light-basic.js" target="_blank">
light-basic.js source</a> to see how this is done.
</p>
</div>
</body>
</html>
66 changes: 66 additions & 0 deletions examples/light-basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
var map;

function init() {
map = new OpenLayers.Map("map",{projection:"EPSG:3857"});

var osm = new OpenLayers.Layer.OSM();
var toMercator = OpenLayers.Projection.transforms['EPSG:4326']['EPSG:3857'];
var center = toMercator({x:-0.05,y:51.5});

/**
* Create 5 random vector features. Your features would typically be fetched
* from the server. The features are given an attribute named "foo".
* The value of this attribute is an integer that ranges from 0 to 100.
*/
var features = [];
for(var i = 0; i < 5; i++) {
features[i] = new OpenLayers.Feature.Vector(
toMercator(new OpenLayers.Geometry.Point(
-0.040 - 0.05*Math.random(),
51.49 + 0.02*Math.random())),
{
foo : 100 * Math.random() | 0
}, {
fillColor : '#008040',
fillOpacity : 0.8,
strokeColor : "#ee9900",
strokeOpacity : 1,
strokeWidth : 1,
pointRadius : 8
});
}

// create the layer with listeners to create and destroy popups
var vector = new OpenLayers.Layer.Vector("Points",{
eventListeners:{
'featureselected':function(evt){
var feature = evt.feature;
var popup = new OpenLayers.Popup.FramedCloud("popup",
OpenLayers.LonLat.fromString(feature.geometry.toShortString()),
null,
"<div style='font-size:.8em'>Feature: " + feature.id +"<br>Foo: " + feature.attributes.foo+"</div>",
null,
true
);
feature.popup = popup;
map.addPopup(popup);
},
'featureunselected':function(evt){
var feature = evt.feature;
map.removePopup(feature.popup);
feature.popup.destroy();
feature.popup = null;
}
}
});
vector.addFeatures(features);

// create the select feature control
var selector = new OpenLayers.Control.SelectFeature(vector,{
autoActivate:true
});

map.addLayers([osm, vector]);
map.addControl(selector);
map.setCenter(new OpenLayers.LonLat(center.x,center.y), 13);
}
2 changes: 1 addition & 1 deletion examples/multiserver.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<h1 id="title">Multiple Server URLS</h1>

<div id="tags">
performance, multiple urls, request
performance, multiple urls, request, light
</div>
<p id="shortdesc">
Load your tiles faster by pointing to the same server, but with different urls
Expand Down
2 changes: 1 addition & 1 deletion examples/navigation-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<h1 id="title">Navigation Control</h1>

<div id="tags">
drag, move, zoom, navigate
drag, move, zoom, navigate, light
</div>

<div id="shortdesc">Demonstrate Navigation Control features</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/ordering.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
<h1 id="title">Z-Index/Y-Order Example</h1>

<div id="tags">
stack, stacking, zindex, ordering
stack, stacking, zindex, ordering, light
</div>

<p id="shortdesc">
Expand Down
2 changes: 1 addition & 1 deletion examples/osm-google.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 id="title">OSM and Google Together</h1>
Demonstrate use of an OSM layer and a Google layer as base layers.
</p>
<div id="tags">
openstreetmap google
openstreetmap google light
</div>
<div id="map" class="smallmap"></div>
<div id="docs">
Expand Down
2 changes: 1 addition & 1 deletion examples/osm-grayscale.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<h1 id="title">Grayscale OSM Example</h1>

<div id="tags">
openstreetmap canvas grayscale
openstreetmap canvas grayscale light
</div>

<div id="shortdesc">Show an OSM Map in grayscale</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/osm.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<h1 id="title">Basic OSM Example</h1>

<div id="tags">
openstreetmap basic
openstreetmap basic light
</div>

<div id="shortdesc">Show a Simple OSM Map</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/resize-features.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<body onload="init()">
<h1 id="title">Resize Features Programatically</h1>
<div id="tags">
vector, feature, resizing, resize
vector, feature, resizing, resize, light
</div>
<p id="shortdesc">
Demonstration of how to use the geometry resize methods to
Expand Down
2 changes: 1 addition & 1 deletion examples/restricted-extent.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<body onload="init()">
<h1 id="title">OpenLayers Restricted Extent Example</h1>
<div id="tags">
map, restrict, restrictedextent, extent
map, restrict, restrictedextent, extent, light
</div>
<p id="shortdesc">
Don't let users drag outside the map extent: instead, limit dragging such
Expand Down
2 changes: 1 addition & 1 deletion examples/rotate-features.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<h1 id="title">Rotate vector features</h1>

<div id="tags">
vector, feature, rotating, rotation, rotate, advanced
vector, feature, rotating, rotation, rotate, advanced, light
</div>
<p id="shortdesc">
Details on how to create and rotate vector features programmatically
Expand Down
2 changes: 1 addition & 1 deletion examples/select-feature-multilayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<body onload="init()">
<h1 id="title">OpenLayers Select Feature on Multiple Layers Example</h1>
<div id="tags">
vector, feature, selecting, selection, advanced
vector, feature, selecting, selection, advanced, light
</div>
<p id="shortdesc">
Select a feature on click with the Control.SelectFeature on multiple
Expand Down
2 changes: 1 addition & 1 deletion examples/single-tile.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<h1 id="title">Single Tile Example</h1>
<div id="tags">tile, ratio, singleTile, performance</div>
<div id="tags">tile, ratio, singleTile, performance, light</div>
<p id="shortdesc">
Use the singleTile option on gridded layers to request a single tile.
</p>
Expand Down
2 changes: 1 addition & 1 deletion examples/style-rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<body onload="init()">
<h1 id="title">Rule Based Style</h1>
<div id="tags">
vector, feature, stylemap, filter, comparison
vector, feature, stylemap, filter, comparison, light
</div>
<p id="shortdesc">
Use rule based styling to use different symbolizers for different
Expand Down
Loading

0 comments on commit d1d5ab9

Please sign in to comment.