01.
<script type=
"text/javascript"
>
02.
var
map, layer;
03.
04.
OpenLayers.ProxyHost =
"/proxy/?url="
;
05.
function
init(){
06.
map =
new
OpenLayers.Map(
'map'
, {maxResolution:
'auto'
});
07.
layer =
new
OpenLayers.Layer.WMS(
"OpenLayers WMS"
,
09.
map.addLayer(layer);
10.
map.setCenter(
new
OpenLayers.LonLat(0, 0), 0);
11.
map.addControl(
new
OpenLayers.Control.LayerSwitcher());
12.
var
newl =
new
OpenLayers.Layer.GeoRSS(
'GeoRSS'
,
'georss.xml'
);
13.
map.addLayer(newl);
15.
var
newl =
new
OpenLayers.Layer.GeoRSS(
'Yelp GeoRSS'
,
'yelp-georss.xml'
, {
'icon'
:yelp});
16.
map.addLayer(newl);
17.
}
18.
</script>