var viewer = new Cesium.Viewer('cesiumContainer', {
sceneMode : Cesium.SceneMode.SCENE2D,
timeline : false,
animation : false
});
var dataSource = Cesium.GeoJsonDataSource.load('http://localhost:8200/geoserver/SrbijaAdmGranice/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=SrbijaAdmGranice:SRB_AdministrativneGranice_Level2_3909&srsName=EPSG:4326&outputFormat=json');
viewer.dataSources.add(dataSource);
viewer.zoomTo(dataSource);
I gate this error : Unknown crs name: urn:ogc:def:crs:EPSG::4326
What should i do?
Do I need some more property in .load function?
Thanks forward.
var crsNames = { 'urn:ogc:def:crs:OGC:1.3:CRS84' : defaultCrsFunction, 'EPSG:4326' : defaultCrsFunction};// Get your geojson from geoserver or wherever it is stored
var geojson = loadYourGeoJson();
// Change the projection to match the one supported by Cesium
geojson.crs.properties.name = "EPSG:4326";
// Load the geojson
Cesium.GeoJsonDataSource.load(geojson);// Just add our CRS to the crs names and point it to the same function
Cesium.GeoJsonDataSource.crsNames['urn:ogc:def:crs:EPSG::4326'] = Cesium.GeoJsonDataSource.crsNames["EPSG:4326"];
var crsNames = { 'urn:ogc:def:crs:OGC:1.3:CRS84' : defaultCrsFunction, 'EPSG:4326' : defaultCrsFunction,
'urn:ogc:def:crs:EPSG::4326' : defaultCrsFunction};