added Graticule control and Util.getFormattedLonLat function. Thanks madair for this excellent patch. p=madair, r=me (closes #1083)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9757 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
30
tests/Control/Graticule.html
Normal file
30
tests/Control/Graticule.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../lib/OpenLayers.js"></script>
|
||||
<script src="http://proj4js.org/lib/proj4js-compressed.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_initialize(t) {
|
||||
t.plan(2);
|
||||
var options = {};
|
||||
map = new OpenLayers.Map("map",{projection:"EPSG:4326"});
|
||||
var layer = new OpenLayers.Layer.WMS();
|
||||
map.addLayers([layer]);
|
||||
|
||||
var control = new OpenLayers.Control.Graticule(options);
|
||||
map.addControl(control);
|
||||
map.zoomToMaxExtent();
|
||||
|
||||
t.ok(control.gratLayer instanceof OpenLayers.Layer.Vector,
|
||||
"constructor sets layer correctly");
|
||||
t.ok(control.gratLayer.features.length > 0,
|
||||
"graticule has features");
|
||||
control.destroy();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map" style="width: 400px; height: 250px;"/>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user