-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map Type Cesium React Reconciler Error #1371
Comments
Hi,
to enable the usage of CesiumJS in projects you need to change the
webpack.config.js a little bit (we will update this in next release, so
that a manual change is not needed anymore, sorry for the inconvenience).
You basically have to:
add the following plugin in the plugins section:
new NormalModuleReplacementPlugin(/cesium$/, path.join(__dirname,
"MapStore2", "web", "client", "libs", "cesium")),
change the exclude property of the JSX loader to:
exclude: /(ol\.js)$|(Cesium\.js)$/,
Let me know if this fixes your issues.
Regards,
Mauro
2017-01-05 19:19 GMT+01:00 ki1ikina <[email protected]>:
… We created a new MapStore2 project with the project creation script with
the latest MapStore 2 code (726be96
<726be96>),
and added the following lines to the index.html file:
<script src="MapStore2/web/client/libs/Cesium/Build/Cesium/Cesium.js"></script>
<link rel="stylesheet" href="MapStore2/web/client/libs/Cesium/Build/Cesium/Widgets/widgets.css" />
Then we changed this line of code in Main.jsx from:
const Main = (props) => <MapViewer plugins={props.plugins}
params={{mapType: "leaflet"}}/>;
to:
const Main = (props) => <MapViewer plugins={props.plugins}
params={{mapType: "cesium"}}/>;
And we now get the following error in the web browser console:
ReactReconciler.js:51 Uncaught (in promise) TypeError: Cannot read
property '_currentElement' of null(…)
When switching *mapType* back to "leaflet" or even "openlayers" all works
as expected. Why does a *mapType* of "cesium" not work?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1371>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ACpGYEva25C5SX6CdMO7wWiMAd9Cp-Vlks5rPTQqgaJpZM4Lb-a4>
.
|
I modified my webpack.config.js like so:
and and I still get the same result in the console (e.g. ReactReconciler.js:51) I'm sure I'm missing something, but not sure what. |
I pulled down the latest version of master (c95bab9) and I was able to successfully manually change between openlayers & cesium. Thank you. |
We created a new MapStore2 project with the project creation script with the latest MapStore 2 code (726be96), and added the following lines to the index.html file:
Then we changed this line of code in Main.jsx from:
const Main = (props) => <MapViewer plugins={props.plugins} params={{mapType: "leaflet"}}/>;
to:
const Main = (props) => <MapViewer plugins={props.plugins} params={{mapType: "cesium"}}/>;
And we now get the following error in the web browser console:
When switching mapType back to "leaflet" or even "openlayers" all works as expected. Why does a mapType of "cesium" not work?
The text was updated successfully, but these errors were encountered: