Where getFeatureInfo Request is built on cesium?

299 Views Asked by At

I am using cesium with angular. I need to know where is built the request url for GetFeatureInfo in cesium but i cannot find it. For the context, what I want to do is display featureInfo on click on the map. But the request sent is using x and y parameters for coordinate and what I would like is replace them by i and j. Moreover, I would like to get bbox information present in this same request to display them. If someone could help me ! Thank you !

2

There are 2 best solutions below

3
ZhefengJin On BEST ANSWER

The request is actually made in UrlTemplateImageryProvider.js's function pickFeatures.

enter image description here

This is a call stack screenshot in this sample.

enter image description here

0
Fab83i On

Ok, First of all, thank you @ZhefengJin !

Due to your answer, I have checked the UrlTemplateImageryProvider.js, but the answer was not there. Nevertheless, It guides me to WebMapServiceImageryProvider.js. There, I noticed that x and y coordinate are assigned to x={i} and y={j} in pickFeatureParams. I tried to add new param in this var but it did not work, I still do not understand why.

But I have tried to had my new param in my getFeatureInfoParameters using the same value, thinking that it will be passed in webMapServiceImageryProvider too and be assigned the same way.

And it works for me.