cmv / cmv-app

CMV - The Configurable Map Viewer - A community supported open source mapping framework built with the Esri JavaScript API and the Dojo Toolkit
https://demo.cmv.io/
MIT License
325 stars 278 forks source link

can cmv be localized??? #949

Closed jiangning-hub closed 4 years ago

jiangning-hub commented 4 years ago

How often can you reproduce it?

Description: I want to localize the cmv application I configure, but beside the ArcGIS server's service there is still one problem that it use 'js.arcgis.com/3.21compact'. I download the 3.21compact/init.js and include it as a local source but not work.

Steps to reproduce:

  1. replace the ArcGIS server service with the service I create and post on my ArcGIS server instance;
  2. download the 'js.arcgis.com/3.21compact/init.js' and include it with a local path;
  3. run by command "grunt connect";
  4. then, the page is not as what I expected.

Expected results:

Actual results: Error message: "The resource from “https://localhost:3000/viewer/js/arcgis-js-api/3.12compact/init.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). localhost:3000".

And the page show nothing at all!

Environment:

Software Version
CMV Version latese(clone from github)
Browser both Chrome and FireFox
Operating system Windows
tmcgee commented 4 years ago

Using the ArcGIS JavaScript API locally is not a problem. Many developers including myself have done that. I have not tried this using grunt connect but would expect it to work. Be sure to follow the directions provided by Esri to set the path for dojo by editing init.js.

jiangning-hub commented 4 years ago

Thanks! So the CMV app's localization would be possible if the configuration is correct? I'll try. I am just new to all these. So,there will be quit a lot stupid questions :(

jiangning-hub commented 4 years ago

Thanks! So the CMV app's localization would be possible if the configuration is correct? I'll try. I am just new to all these. So,there will be quit a lot stupid questions :(

Just happen to understand that '3.21compact' is an old version of the arcgis js api. And, just unable to get it since I failed to sign up an arcgis account. Stupid...

jiangning-hub commented 4 years ago

Figure it out, finally. Using the '3.22compact' version, and it work just fine. The '3.21compact' version can be download with just 200b/s, it is gonna kill me. Glad to see '3.22compact' work.