简体   繁体   中英

Where getFeatureInfo Request is built on cesium?

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 !

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.

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

在此处输入图片说明

This is a call stack screenshot in this sample .

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM