git-svn-id: http://svn.openlayers.org/trunk/openlayers@7714 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
35 lines
875 B
HTML
35 lines
875 B
HTML
<html>
|
|
<head>
|
|
<script src="../../lib/OpenLayers.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
function test_activate(t) {
|
|
t.plan(1);
|
|
var featureList = ['foo', 'bar'];
|
|
|
|
var layer = new OpenLayers.Layer.Vector("Vector Layer", {
|
|
strategies: [new OpenLayers.Strategy.Fixed()],
|
|
|
|
// a fake protocol
|
|
protocol: {
|
|
read: function(options) {
|
|
options.callback.call(options.scope, {features: featureList});
|
|
}
|
|
},
|
|
|
|
addFeatures: function(features) {
|
|
t.eq(features, featureList, "Features added to the layer");
|
|
}
|
|
});
|
|
|
|
var map = new OpenLayers.Map('map');
|
|
map.addLayer(layer);
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="map" style="width: 400px; height: 200px" />
|
|
</body>
|
|
</html>
|