Discussion:
OpenLayers 3 - Cesium integration: ol is not defined error
(too old to reply)
maw269
2017-05-11 18:16:32 UTC
Permalink
I am trying to get Cesium working in my OpenLayers 3 application.

I am using ol3-cesium-v1.7 from:
https://github.com/openlayers/ol-cesium/releases My application was using
OpenLayers 3.82.

I removed the call to ol.js and replaced it with this:
*

*

In my code I have this:

* map = new ol.Map({
target: 'map',
renderer: 'canvas',
layers: mapLayersArray,
controls: ol.control.defaults({
attributionOptions: /** @type
{olx.control.AttributionOptions} */ ({
collapsible: false
})
}).extend([mousePositionControl]),
view: new ol.View({
center: ol.proj.transform(defaultCoordinate,
fromProjection, toProjection),
zoom: defaultMapZoomLevel,
minZoom: 2,
extent: olExtent
})
});

var ol3d = new olcs.OLCesium({map: map}); // map is the
ol.Map instance
ol3d.setEnabled(true);
*
I am getting these errors:

*goog.require could not find: ol.layer.Group

Uncaught Error: goog.require could not find: ol.layer.Group
at Object.goog.require (ol3cesium-debug.js:475)
at ol3cesium-debug.js:1705

ReferenceError: ol is not defined
at new <anonymous> (mapService.js:11)
at e (angular.js:4112)
at Object.instantiate (angular.js:4123)
at Object.<anonymous> (angular.js:3981)
at Object.e [as invoke] (angular.js:4112)
at angular.js:3944
at d (angular.js:4071)
at e (angular.js:4103)
at Object.instantiate (angular.js:4123)
at Object.<anonymous> (angular.js:3981)*

Any ideas what I am missing?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/OpenLayers-3-Cesium-integration-ol-is-not-defined-error-tp5320223.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...