File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -547,11 +547,13 @@ public function removeDatastoreAction($request)
547
547
public function getFeatureInfoAction ($ request ){
548
548
$ bbox = $ request ['bbox ' ];
549
549
$ schemaName = $ request ['schema ' ];
550
+ $ srid = $ request ['srid ' ];
550
551
$ dataSets = [];
551
552
$ remoteData = $ this ->getSchemaByName ($ schemaName )["popup " ]["remoteData " ];
552
553
553
554
foreach ($ remoteData as $ url ){
554
555
$ url = str_replace ("{bbox} " , $ bbox , $ url );
556
+ $ url = str_replace ("{srid} " , $ srid , $ url );
555
557
try {
556
558
$ dataSets [] = file_get_contents ($ url );
557
559
} catch (\Exception $ e ) { //Todo Throw correct e in debug.
Original file line number Diff line number Diff line change 2079
2079
} ) ;
2080
2080
2081
2081
setTimeout ( function ( ) {
2082
- if ( popupConfiguration . remoteData ) {
2082
+
2083
+ if ( popupConfiguration . remoteData && olFeature . isNew ) {
2083
2084
2084
2085
2085
2086
var bbox = dialog . data ( "feature" ) . geometry . getBounds ( ) . toBBOX ( ) ;
2086
- var url = widget . elementUrl + "getFeatureInfo/?bbox=" + bbox + "&schema=" + schema . schemaName ;
2087
+ var srid = map . getProjection ( ) . replace ( 'EPSG:' , '' ) ;
2088
+ var url = widget . elementUrl + "getFeatureInfo/" ;
2087
2089
2088
- $ . ajax ( { url : url } ) . success ( function ( response ) {
2090
+ $ . ajax ( { url : url , data : {
2091
+ bbox :bbox ,
2092
+ schema : schema . schemaName ,
2093
+ srid : srid
2094
+ } } ) . success ( function ( response ) {
2089
2095
_ . each ( response . dataSets , function ( dataSet ) {
2090
2096
var neData = JSON . parse ( dataSet . features [ 0 ] . properties ) ;
2091
2097
$ . extend ( data , newData ) ;
You can’t perform that action at this time.
0 commit comments