Add support for reprojection of vector formats when loading data. This allows
for the definition of a 'projection' option on a layer. IF this projection object exists, it will be used to create the format's internal/external projection options, making it such that any data loaded will be reprojected to the map's projection automatically. r=pagameba (Closes #1273, #1225, #1269) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5828 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
t.ok( layer instanceof OpenLayers.Layer.GeoRSS, "new OpenLayers.Layer.GeoRSS returns object" );
|
||||
t.eq( layer.location, georss_txt, "layer.location is correct" );
|
||||
var markers;
|
||||
layer.loadRSS();
|
||||
t.delay_call( 1, function() {
|
||||
t.eq( layer.markers.length, 40, "marker length is correct" );
|
||||
var ll = new OpenLayers.LonLat(-71.142197, 42.405696);
|
||||
@@ -43,6 +44,7 @@
|
||||
t.ok( layer instanceof OpenLayers.Layer.GeoRSS, "new OpenLayers.Layer.GeoRSS returns object" );
|
||||
t.eq( layer.location, atom_xml, "layer.location is correct" );
|
||||
var markers;
|
||||
layer.loadRSS();
|
||||
t.delay_call( 1, function() {
|
||||
t.eq( layer.markers.length, 2, "marker length is correct" );
|
||||
var ll = new OpenLayers.LonLat(29.9805, 36.7702);
|
||||
@@ -153,7 +155,9 @@
|
||||
map.addLayers([layer,otherLayer]);
|
||||
map.setCenter(new OpenLayers.LonLat(0,0),0);
|
||||
var defaultIcon = OpenLayers.Marker.defaultIcon();
|
||||
t.delay_call( 1, function() {
|
||||
layer.loadRSS();
|
||||
otherLayer.loadRSS();
|
||||
t.delay_call( 2, function() {
|
||||
t.ok(layer.markers[0].icon, "The layer has a icon");
|
||||
t.eq(layer.markers[0].icon.url, defaultIcon.url, "The layer without icon has the default icon.");
|
||||
t.eq(otherLayer.markers[0].icon.url, the_icon.url,"The layer with an icon has that icon.");
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
t.plan( 5 );
|
||||
|
||||
layer = new OpenLayers.Layer.Text('Test Layer', { location: datafile });
|
||||
layer.loadText();
|
||||
t.ok( layer instanceof OpenLayers.Layer.Text, "new OpenLayers.Layer.Text returns object" );
|
||||
t.eq( layer.location, datafile, "layer.location is correct" );
|
||||
var markers;
|
||||
|
||||
Reference in New Issue
Block a user