1 <html xmlns="http://www.w3.org/1999/xhtml">
3 <title>OpenLayers BBOX Strategy Example</title>
4 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5 <link rel="stylesheet" href="style.css" type="text/css" />
6 <script src="../lib/OpenLayers.js"></script>
7 <script type="text/javascript">
9 OpenLayers.ProxyHost = (window.location.host == "localhost") ?
10 "/cgi-bin/proxy.cgi?url=" : "proxy.cgi?url=";
13 map = new OpenLayers.Map('map', {
14 restrictedExtent: new OpenLayers.Bounds(-180, -90, 180, 90)
16 var base = new OpenLayers.Layer.WMS("Imagery",
17 ["http://t1.hypercube.telascience.org/tiles?",
18 "http://t2.hypercube.telascience.org/tiles?",
19 "http://t3.hypercube.telascience.org/tiles?",
20 "http://t4.hypercube.telascience.org/tiles?"],
24 var style = new OpenLayers.Style({
25 externalGraphic: "${img_url}",
29 photos = new OpenLayers.Layer.Vector("Photos", {
30 strategies: [new OpenLayers.Strategy.BBOX()],
31 protocol: new OpenLayers.Protocol.HTTP({
32 url: "http://labs.metacarta.com/flickrbrowse/flickr.py/flickr",
35 sort: "interestingness-desc",
37 request: "GetFeatures",
41 format: new OpenLayers.Format.GML()
43 styleMap: new OpenLayers.StyleMap(style)
46 map.addLayers([base, photos]);
47 map.setCenter(new OpenLayers.LonLat(-116.45, 35.42), 5);
52 <body onload="init()">
53 <h1 id="title">BBOX Strategy Example</h1>
55 Uses a BBOX strategy to request features within a bounding box.
57 <div id="map" class="smallmap"></div>
59 <p>The BBOX strategy requests data within a bounding box. When the
60 previously requested data bounds are invalidated (by browsing to
61 some area not covered by those bounds), another request for data