|
Revision 4222, 1.2 kB
(checked in by tschaub, 1 year ago)
|
exposing the map for firebuggers - and removing some crufty html comments
|
| Line | |
|---|
| 1 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 2 |
<head> |
|---|
| 3 |
<style type="text/css"> |
|---|
| 4 |
#map { |
|---|
| 5 |
width: 800px; |
|---|
| 6 |
height: 400px; |
|---|
| 7 |
border: 1px solid black; |
|---|
| 8 |
} |
|---|
| 9 |
</style> |
|---|
| 10 |
<script src="../lib/OpenLayers.js"></script> |
|---|
| 11 |
<script type="text/javascript"> |
|---|
| 12 |
var map, layer; |
|---|
| 13 |
|
|---|
| 14 |
OpenLayers.ProxyHost = "/proxy/?url="; |
|---|
| 15 |
function init(){ |
|---|
| 16 |
map = new OpenLayers.Map('map', {maxResolution:'auto'}); |
|---|
| 17 |
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", |
|---|
| 18 |
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); |
|---|
| 19 |
map.addLayer(layer); |
|---|
| 20 |
map.setCenter(new OpenLayers.LonLat(0, 0), 0); |
|---|
| 21 |
map.addControl(new OpenLayers.Control.LayerSwitcher()); |
|---|
| 22 |
var newl = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss.xml'); |
|---|
| 23 |
map.addLayer(newl); |
|---|
| 24 |
var yelp = new OpenLayers.Icon("http://openlayers.org/~crschmidt/yelp.png", new OpenLayers.Size(20,29)); |
|---|
| 25 |
var newl = new OpenLayers.Layer.GeoRSS( 'Yelp GeoRSS', 'yelp-georss.xml', {'icon':yelp}); |
|---|
| 26 |
map.addLayer(newl); |
|---|
| 27 |
} |
|---|
| 28 |
</script> |
|---|
| 29 |
</head> |
|---|
| 30 |
<body onload="init()"> |
|---|
| 31 |
<h1>GeoRSS in OpenLayers</h1> |
|---|
| 32 |
<div id="map"></div> |
|---|
| 33 |
</body> |
|---|
| 34 |
</html> |
|---|