Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 3 weeks ago
GetFeatureInfoUrl on layers
Hello, I am trying to get information from layers (I have my map, and 2 layers), my layers from Geoserver (localhost). My layers are displayed.
at this moment, how I create layers :
private OLSource afficheCalque(String calqueId) {
//Variable
Map<String, String> params = new HashMap<>();
OLTileWMSSourceOptions options = new OLTileWMSSourceOptions();
options.setUrl(CChaineCaractere.WORKSPACE);
params.put(CChaineCaractere.LAYERS, calqueId);
params.put(CChaineCaractere.FORMAT, CChaineCaractere.PNG);
params.put("CRS", "EPSG:4326");
options.setParams(params);
return new OLTileWMSSource(options);
}
And, how I am trying get information from layers
((CarteSiteVue) vue).getMap().addClickListener(new OLMap.ClickListener() {
@Override
public void onClick(OLMap.OLClickEvent pClickEvent) {
System.out.println(pClickEvent.getFeatureInfoUrls());
}
});
But my Urls don't give me results.. I have this error :
{"type":"FeatureCollection","totalFeatures":"unknown","features":[],"crs":null}
What are my mistakes ?
Last updated on
You cannot reply to this thread.