Permalink
Browse files

Merge pull request #342 from mpriour/multiple-builds

Add specific light build example and tag eligible 'light' build examples
  • Loading branch information...
2 parents d563084 + a38e4ec commit 1febb443760d9560edf4387890ca6468f11b85a2 Éric Lemoine committed Mar 22, 2012
Showing with 146 additions and 45 deletions.
  1. +1 −1 examples/all-overlays-google.html
  2. +1 −1 examples/all-overlays.html
  3. +1 −1 examples/attribution.html
  4. +1 −1 examples/bing-tiles.html
  5. +1 −1 examples/bing.html
  6. +1 −1 examples/boxes-vector.html
  7. +1 −1 examples/buffer.html
  8. +1 −1 examples/click.html
  9. +1 −1 examples/clientzoom.html
  10. +1 −1 examples/custom-control.html
  11. +1 −1 examples/example.html
  12. +1 −1 examples/geojson.html
  13. +1 −1 examples/google-static.html
  14. +1 −1 examples/google-v3-alloverlays.html
  15. +1 −1 examples/google-v3.html
  16. +1 −1 examples/graphic-name.html
  17. +1 −1 examples/gutter.html
  18. +1 −1 examples/late-render.html
  19. +1 −1 examples/layer-opacity.html
  20. +1 −1 examples/layerLoadMonitoring.html
  21. +1 −1 examples/layerswitcher.html
  22. +35 −0 examples/light-basic.html
  23. +66 −0 examples/light-basic.js
  24. +1 −1 examples/multiserver.html
  25. +1 −1 examples/navigation-control.html
  26. +1 −1 examples/ordering.html
  27. +1 −1 examples/osm-google.html
  28. +1 −1 examples/osm-grayscale.html
  29. +1 −1 examples/osm.html
  30. +1 −1 examples/resize-features.html
  31. +1 −1 examples/restricted-extent.html
  32. +1 −1 examples/rotate-features.html
  33. +1 −1 examples/select-feature-multilayer.html
  34. +1 −1 examples/single-tile.html
  35. +1 −1 examples/style-rules.html
  36. +1 −1 examples/stylemap.html
  37. +1 −1 examples/styles-context.html
  38. +1 −1 examples/styles-rotation.html
  39. +1 −1 examples/styles-unique.html
  40. +1 −1 examples/symbolizers-fill-stroke-graphic.html
  41. +1 −1 examples/tile-origin.html
  42. +1 −1 examples/transition.html
  43. +1 −1 examples/vector-features-with-text.html
  44. +1 −1 examples/vector-features.html
  45. +1 −1 examples/wms-untiled.html
  46. +1 −1 examples/wms-v13.html
  47. +1 −1 examples/zoom.html
@@ -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.
@@ -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.
@@ -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">
View
@@ -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>
View
@@ -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">
@@ -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">
View
@@ -37,7 +37,7 @@
<h1 id="title">Buffer Example</h1>
<div id="tags">
- buffer, performance, tile
+ buffer, performance, tile, light
</div>
<p id="shortdesc">
View
@@ -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">
View
@@ -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 {
@@ -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">
View
@@ -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>
View
@@ -63,7 +63,7 @@
<h1 id="title">GeoJSON Example</h1>
<div id="tags">
- JSON, GeoJSON
+ JSON, GeoJSON, light
</div>
<p id="shortdesc">
@@ -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.
@@ -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.
View
@@ -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.
@@ -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.
View
@@ -18,7 +18,7 @@
<h1 id="title">Gutter Example</h1>
<div id="tags">
- gutter, quality, tile
+ gutter, quality, tile, light
</div>
<p id="shortdesc">
@@ -29,7 +29,7 @@
<h1 id="title">Late Rendering</h1>
<div id="tags">
- creation, render, div
+ creation, render, div, light
</div>
<p id="shortdesc">
@@ -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">
@@ -112,7 +112,7 @@
<h1 id="title">Layer Load Monitoring Example</h1>
<div id="tags">
- monitor, loading
+ monitor, loading, light
</div>
<p id="shortdesc">
@@ -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">
View
@@ -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>
View
@@ -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);
+}
@@ -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
@@ -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>
View
@@ -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">
View
@@ -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">
@@ -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>
View
@@ -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>
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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>
@@ -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
Oops, something went wrong.

0 comments on commit 1febb44

Please sign in to comment.