Remove old GetFeatureInfo related code
This commit is contained in:
@@ -1,55 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
|
||||||
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
|
|
||||||
<title>Get feature info example</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
|
||||||
<div class="navbar-inner">
|
|
||||||
<div class="container">
|
|
||||||
<a class="brand" href="./"><img src="../resources/logo.png"> OpenLayers 3 Examples</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<div class="row-fluid">
|
|
||||||
<div class="span12">
|
|
||||||
<div id="map" class="map"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row-fluid">
|
|
||||||
|
|
||||||
<div class="span4">
|
|
||||||
<h4 id="title">GetFeatureInfo example</h4>
|
|
||||||
<p id="shortdesc">Example of a WMS layer and a vector layer, both configured to provide feature information on click.</p>
|
|
||||||
<div id="docs">
|
|
||||||
<p>See the <a href="getfeatureinfo.js" target="_blank">getfeatureinfo.js source</a> to see how this is done.</p>
|
|
||||||
</div>
|
|
||||||
<div id="tags">getfeatureinfo</div>
|
|
||||||
</div>
|
|
||||||
<div class="span4 offset4">
|
|
||||||
<div id="info" class="alert alert-success">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="loader.js?id=getfeatureinfo" type="text/javascript"></script>
|
|
||||||
<script src="../resources/example-behaviour.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
goog.require('ol.Map');
|
|
||||||
goog.require('ol.RendererHint');
|
|
||||||
goog.require('ol.View2D');
|
|
||||||
goog.require('ol.layer.Tile');
|
|
||||||
goog.require('ol.layer.Vector');
|
|
||||||
goog.require('ol.parser.GeoJSON');
|
|
||||||
goog.require('ol.source.TileWMS');
|
|
||||||
goog.require('ol.source.Vector');
|
|
||||||
goog.require('ol.style.Stroke');
|
|
||||||
goog.require('ol.style.Style');
|
|
||||||
|
|
||||||
|
|
||||||
var wms = new ol.layer.Tile({
|
|
||||||
source: new ol.source.TileWMS({
|
|
||||||
url: 'http://demo.opengeo.org/geoserver/wms',
|
|
||||||
params: {'LAYERS': 'ne:ne'}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
var vector = new ol.layer.Vector({
|
|
||||||
source: new ol.source.Vector({
|
|
||||||
parser: new ol.parser.GeoJSON(),
|
|
||||||
url: 'data/countries.geojson'
|
|
||||||
}),
|
|
||||||
style: new ol.style.Style({
|
|
||||||
symbolizers: [
|
|
||||||
new ol.style.Stroke({
|
|
||||||
color: '#33cc66',
|
|
||||||
width: 2
|
|
||||||
})
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
transformFeatureInfo: function(features) {
|
|
||||||
return features.length > 0 ?
|
|
||||||
features[0].getId() + ': ' + features[0].get('name') : ' ';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var map = new ol.Map({
|
|
||||||
layers: [wms, vector],
|
|
||||||
renderer: ol.RendererHint.CANVAS,
|
|
||||||
target: 'map',
|
|
||||||
view: new ol.View2D({
|
|
||||||
center: [0, 0],
|
|
||||||
zoom: 1
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
map.on('singleclick', function(evt) {
|
|
||||||
map.getFeatureInfo({
|
|
||||||
pixel: evt.getPixel(),
|
|
||||||
success: function(featureInfoByLayer) {
|
|
||||||
document.getElementById('info').innerHTML = featureInfoByLayer.join('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
goog.provide('ol.source.FeatureInfoSource');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @interface
|
|
||||||
* @todo stability experimental
|
|
||||||
*/
|
|
||||||
ol.source.FeatureInfoSource = function() {};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {ol.Pixel} pixel Pixel.
|
|
||||||
* @param {ol.Map} map The map that the pixel belongs to.
|
|
||||||
* @param {function(string)} success Callback with feature info.
|
|
||||||
* @param {function()=} opt_error Optional error callback.
|
|
||||||
*/
|
|
||||||
ol.source.FeatureInfoSource.prototype.getFeatureInfoForPixel =
|
|
||||||
goog.abstractMethod;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
@exportSymbol ol.source.WMSGetFeatureInfoMethod
|
|
||||||
@exportProperty ol.source.WMSGetFeatureInfoMethod.IFRAME
|
|
||||||
@exportProperty ol.source.WMSGetFeatureInfoMethod.XHR_GET
|
|
||||||
Reference in New Issue
Block a user