Skip to content

Commit

Permalink
Correctly identify a local layer when using GeoNodeQueryTool
Browse files Browse the repository at this point in the history
  • Loading branch information
capooti committed Mar 26, 2018
1 parent 53737f7 commit 09b19f6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ gxp.plugins.GeoNodeQueryTool = Ext.extend(gxp.plugins.Tool, {
vendorParams['buffer'] = 25;

/* Use OpenLayers.Control.GetFeature for local layers only */
if (layer.url.indexOf(localUrl) > -1) {
var url_parser = document.createElement('a');
url_parser.href = layer.url;
// if (layer.url.indexOf(localUrl) > -1) {
if (localUrl.indexOf(url_parser.host)) {
//console.log(layer.name + 'IS LOCAL?' );
var control = new OpenLayers.Control.GetFeature({
protocol:OpenLayers.Protocol.WFS.fromWMSLayer(layer),
Expand Down

0 comments on commit 09b19f6

Please sign in to comment.