Skip to content

Commit

Permalink
#43 consolidate wms/getFeatureInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jan 27, 2021
1 parent 4129f3f commit cc1862c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/WMSLayer.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ WMSLayer <- R6Class("WMSLayer",
},

#getFeatureInfo
getFeatureInfo = function(srs = NULL, crs = NULL, styles = NULL, feature_count = 1,
getFeatureInfo = function(srs = NULL, styles = NULL, feature_count = 1,
x, y, width, height, bbox,
info_format = "application/vnd.ogc.gml",
...){
Expand All @@ -206,15 +206,16 @@ WMSLayer <- R6Class("WMSLayer",
}

if(is.null(srs)){
srs <- self$getBoundingBoxSRS()
}
if(is.null(crs)){
crs <- self$getBoundingBoxCRS()
srs <- if(startsWith(private$version, "1.1")){
self$getBoundingBoxSRS()
}else if(startsWith(private$version, "1.3")){
self$getBoundingBoxCRS()
}
}

ftFeatures <- WMSGetFeatureInfo$new(
op = op, url = private$url, version = private$version,
layers = private$name, srs = srs, crs = crs, styles = styles,
layers = private$name, srs = srs, styles = styles,
feature_count = feature_count,
x = x, y = y, width = width, height = height, bbox = bbox,
info_format = info_format,
Expand Down

0 comments on commit cc1862c

Please sign in to comment.