OpenLayers OpenLayers

Changeset 172

Show
Ignore:
Timestamp:
05/18/06 22:26:00 (3 years ago)
Author:
crschmidt
Message:

Add working version of text file layer. (For those of you playing along at home, this was about 45 minutes of work -- part of which was trying to figure out why the data file wouldn't work, only to find out I had expandtab on in vim -- so I wasn't typing tabs, i was typing spaces!)

This has uncovered the fact that there is some logical error in our code somewhere: Visit markers.html then click the purple marker repeatedly. Despite the fact that you start clicking in the sea, the marker moves north, as does your center point.

This text file layer does not yet support popups or anything else, just drawing the images at a lat/lon with an 'image' given in the textfile.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers.js

    r100 r172  
    4949        "OpenLayers/Layer/Grid.js", 
    5050        "OpenLayers/Layer/Marker.js", 
     51        "OpenLayers/Layer/Text.js", 
    5152        "OpenLayers/Layer/WMS.js", 
    5253        "OpenLayers/Control.js", 
  • trunk/openlayers/markers.html

    r107 r172  
    2323            var markers = new OpenLayers.Layer.Marker( "Markers" ); 
    2424            map.addLayer(markers); 
     25            var newl = new OpenLayers.Layer.Text( "text", "./textfile.txt" ); 
     26            map.addLayer(newl); 
    2527            var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',new OpenLayers.Size(10,17)); 
    2628            markers.addMarker(new OpenLayers.Marker(icon, new OpenLayers.LonLat(0,0)));