[OpenLayers-Users] openlayers api changed?

Marc Coevoet marcc at dommel.be
Wed Oct 3 10:00:02 PDT 2012


Hello,

3 years ago, I made a openlayers app with radio frequencies for FM and 
adjacent stations that could give noise.

I see that suddenly the app no longer works.

I will copy the code here:
(images are on the right place ..)

index.htm:
====
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <style type="text/css">
#map {
         width: 100%;
         height: 100%;
         border: 0px;
         padding: 0px;
         position: absolute;
      }
body {
         border: 0px;
         margin: 0px;
         padding: 0px;
         height: 100%;
      }
     </style>
     <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
     <script 
src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
     <script type="text/javascript">
         <!--
         // complex map object
         var map;

	// Start position for the map (hardcoded here for simplicity,
	// but maybe you want to get from URL params)
	var lat = 50.89517;
	var lon = 2.7206;
	var zoom = 7;

         function init(){
             map = new OpenLayers.Map('map',
                     { maxExtent: new 
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
                       numZoomLevels: 19,
                       maxResolution: 156543.0399,
                       units: 'm',
                       projection: new OpenLayers.Projection("EPSG:900913"),
                       displayProjection: new 
OpenLayers.Projection("EPSG:4326")
                     });

             var layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");

             var layerTah = new 
OpenLayers.Layer.OSM.Osmarender("Tiles at Home");

             map.addLayers([layerMapnik,layerTah]);

             var pois = new OpenLayers.Layer.Text( "My Points",
                     { location:"./textfile.txt",
                       projection: map.displayProjection
                     });
             map.addLayer(pois);

             map.addControl(new OpenLayers.Control.LayerSwitcher());

             var lonLat = new OpenLayers.LonLat(lon, 
lat).transform(map.displayProjection,  map.projection);
             if (!map.getCenter()) map.setCenter (lonLat, zoom);
         }
         // -->
     </script>
   </head>
   <body onload="init()">
     <div id="map"></div>
   </body>
</html>
===

The textfile.txt starts like this :
lat	lon	title	description	icon	iconSize	iconOffset
57.28528	10.10139	91.500MHz	Broenderslev                   above sea 
40m antenna height  40m erp h/v 22.0dBm/     dBm pol/dir / 
../antenne.png	40,40	-20,-20
46.26750	10.11778	91.500MHz	Brusio                         above sea 
1097m antenna height  50m erp h/v 20.0dBm/     dBm pol/dir / 
../antenne.png	40,40	-20,-20
51.80139	10.61694	91.500MHz	Brocken                        above sea 
1140m antenna height  65m erp h/v 50.0dBm/     dBm pol/dir / 
../antenne.png	40,40	-20,-20
53.74444	10.70583	91.500MHz	Berkenthin                     above sea 
65m antenna height 147m erp h/v 30.0dBm/     dBm pol/dir / 
../antenne.png	40,40	-20,-20
48.90222	11.16306	91.500MHz	Eichstaett                     above sea 
470m antenna height  30m erp h/v 20.0dBm/     dBm pol/dir / 
../antenne.png	40,40	-20,-20
46.40083	11.28472	91.500MHz	Bolzano Montic                 above sea 
638m antenna height  97m erp h/v 30.0dBm/     dBm pol/dir / 
../antenne.png	40,40	-20,-20
...



Where could te problem be?

The fiels are uploaded to
http://dxradio.woelmuis.nl/research/fmmaps/
(and the pub does'nt make a problem)

Marc
-- 
The "Penguin" has arrived - and he's not going away - ever.
What's on Shortwave guide: choose an hour, go!
http://shortwave dot tk
700+ Radio Stations on SW http://swstations dot tk
300+ languages on SW http://radiolanguages dot tk


More information about the Users mailing list