USGS WMS feature info

1. A concise explanation of the problem you’re experiencing.

I want to have a USGS geological map overlay. There are WMS servers available here:

https://mrdata.usgs.gov/geology/state/

BUT I would like for the feature info to displayed with the map, similar to how it is when you download the KML to google earth.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

KML code:

var bing = new Cesium.BingMapsImageryProvider({

url : ‘https://dev.virtualearth.net’,

key : ‘ejUrhPoq39FSAv1TyjA4~OK3R3Pgz1ERhJDCrZmAPIQ~AvGMBhdtbfuicY–Sn-BZuPpj_hHbrASZZ9dtx6CHEkzgENyrfeFolsrBr4lBN95’,

mapStyle : Cesium.BingMapsStyle.AERIAL

});

var geor = new Cesium.WebMapServiceImageryProvider({

url : ‘http://mrdata.usgs.gov/services/or’,

layers : ‘Oregon_Geology’,

enablePickFeatures : true,

getFeatureInfo : ‘https://mrdata.usgs.gov/services/or’,

getFeatureInfoParameters : {

info_format : ‘application/vnd.ogc.gml/3.1.1’

},

});

var imageryViewModels = ;

imageryViewModels.push(new Cesium.ProviderViewModel({

name : ‘USGS Geological Map’,

iconUrl : Cesium.buildModuleUrl(‘http://mrdata.usgs.gov/geology/state/images/or.jpeg’),

tooltip : ‘WMS Geological Maps, provided by USGS, from https://mrdata.usgs.gov/services/or’,

creationFunction : function() {

return geor;

}

}));

imageryViewModels.push(new Cesium.ProviderViewModel({

name : ‘Bing Terrain Map’,

iconUrl : Cesium.buildModuleUrl(‘data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUTEhIVFRUVGBUXGBgYFxgXGRkWGBcWFxcVGRgYHSggGB0lGxgWITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGy0fIB8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0tNzctNzcrLf/AABEIALUBFwMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAAAAQIDBAUGB//EADkQAAEDAgUCBAUDBAEDBQAAA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kUaZyuIzPdeRNgBxb3XKYjEPf/ADe50aZnEx4SurDhbqTMpzXEQgJUJV2mIISIQAqEpaeD6JEACE+jRc6comE6nhXkEhjobrbTX7FLyQURJCU7IbwDaxsbHha/Sv03UqiXHILai/pt5qZZIxVsaTZiyjMtvr/6eOHaKgcS0uiCLi1iSLXgrIq4Z7Q1zmkB8ls7gaojNSVoGqH4Oh+49rAYzOAnxK6X/wBLsAdL3bZTYR9CuRC1+ndeq0z8RNRu7XGfMOMkeyjIpv8AVlRr2WX/AKZqD+oeTfuVHi8AyiCXAkgCATudLD7rq+n9doVS1rHEPN8rgQbatnQnzWV+tKctDjAh2n902nxEfMrCOSbkoy0W4qrRhV8a0MApSDbaC3mDyTus1KhdkYqPDGwQhCYCtPaUiEIAEIQgBEqEIAEkIQgAyq30XFOp12ObE5gLjYmD7oQomtDR3HVazs7Wh0anm40XMY/9Q1ILGgAz/KxPNhFkIXFgin01m3Zm/wDVq1/+4b+H2T6nWa7mhpqmAZEQDOl3AZjqbEwhC7FFfRnbKtWq5xLnElxMknUnlNQhaEiFdJ039MtqUhVdUN4sAOJ1MoQsc8nGOioqyTDdCokw7Ob65gOLQB3WpToUz/GlTbkiPhBNjAvCELjlOT6zRJEjqOZ+Qm3gJUNToFKoQ828B78+aEKU2iqRo0ekMgGb22H0UdGmDpA7RxzyhCltlUqIsPSzvhx3d4W7LYo0GsGVogD63QhKQQDqGGa5oaQCAZuOLhebfqPGuqVnTYN+FonQbnxJuhC6fxukZDODptwiEIXcjBgyoQZBIIuCLEHkFWMX1OrVAFR+YNJIkCRNjcDwSoUtIZXQhCokEIQgYIQhAH//2Q==’),

tooltip : ‘Bing Maps, provided by www.microsoft.com’,

creationFunction : function() {

return bing;

}

}));

imageryViewModels.push(new Cesium.ProviderViewModel({

name : ‘USGS Geological Map’,

iconUrl : Cesium.buildModuleUrl(‘http://mrdata.usgs.gov/geology/state/images/or.jpeg’),

tooltip : ‘WMS Geological Maps, provided by USGS, from https://mrdata.usgs.gov/services/or’,

creationFunction : function() {

return geor;

}

}));

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

timeline: false,

animation: false,

baseLayerPicker : true,

imageryProviderViewModels : imageryViewModels,

});

var imageryViewModels = ;

viewer.dataSources.add(Cesium.KmlDataSource

.load(’…/Data/oregon.kml’, {

camera: viewer.camera,

canvas: viewer.canvas,

clampToGround: true,

})

)

.then( function (dataSource) {

viewer.flyTo(dataSource.entities);

});

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I’m building a geological geo-spatial referencing system for micro-structural geoscience data.

4. The Cesium version you’re using, your operating system and browser.

1.37

Hi Matthew,

If I’m understanding correctly, you want to add each of the features to the globe as objects you can then style by creating an icon and enabling a tooltip.

To do that, I believe you can use the getFeatureInfoFormats option when constructing the WebMapServiceImageryProvider. In the callback for the GetFeatureInfoFormat object, you can get the information about each feature.

You can then add an entity for each feature. The full rundown of Entities are in this tutorial. I would recommend a billboard. We don’t have a exact “tooltip” analog. Try labels or set the desription of the entity and use the infoBox.

Thanks,

Gabby