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:
ahocevar
2009-10-24 05:36:34 +00:00
parent a864838e96
commit 6d43a28da6
7 changed files with 528 additions and 0 deletions

View 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>