-
Notifications
You must be signed in to change notification settings - Fork 52
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
Error loading 3D Map #40
Comments
Hi @Gemeapp, Given the file:// path below, I strongly suspect that you are loading our maps from a file on disk, and not over HTTP or HTTPS. The following jsfiddle shows the problem not reproducing: https://jsfiddle.net/1348xhej/ - please insert your API key and hit run. Specifically I'd recommend the following:
More assistance can be found here: https://www.sitepoint.com/3d-maps-with-eegeo-and-leaflet/ I'm going to close this issue - please re-open if this does not solve the issue with additional reproduction steps. |
Hi @ThorvaldAagaard Can you confirm you're not running via file:// ? |
On android and IOS as native app it is using file, and if that isn't supported, i have no business case. But i have made a version in the browser that does not use file:// just to test. And as shown in fiddle you should look at the error in the console. I my webapp the map is not displaed and probably due to the missing height |
Our examples (e.g. https://docs.wrld3d.com/wrld.js/latest/docs/examples/) set the height of the map via a style tag on the containing div. In practice, this value would come from a stylesheet for the page. You are correct that the "Refused to set unsafe header" errors should not affect display of the map. Unfortunately these are generated by a library we use and are currently outside our control. |
I am setting a height on the div tag, but after adding the map it looks like the div tag height was minimized. But I will give it a new try. The issue with the protocol you inheret from how the app is loaded, thus preventing the map to be used on devices, is that also a library issue |
The problem with using wrld.js through a file:// URL is due to browser security restrictions on loading data from the local filesystem. For running on a device, we recommend our Android SDK or iOS SDK. |
I am using Ionic (PhoneGap), that targets both platforms in a webview, so using the specific SDK's are not an option. All that is needed is that the library should not inherit the protocol but force http or https But as Ionic also targets a browserplatform I have uploaded a version to https://geme-cce67.firebaseapp.com/#/mapdemo - Here you can see my problem with displaying the 3D-world - The hieght of the map div is set to 75% |
@ThorvaldAagaard we will schedule a fix to the file:// protocol inference as soon as we can. I'm not sure about your height problem, our maps display in a div & surface that's dimensions are completely in your control, can you please confirm that this is not an issue with your styling, and if it is not an issue with your styling provide a smaller reproduction? |
It seems to be a timing issue with the loading of the my page, so you can just ignore the height issue. |
Adding to roadmap to schedule file:// protocol isssues |
Hi, |
This is scheduled for fixing - issue is still present. For phonegap we have managed to circumvent this previously: https://github.com/wrld3d/wrld-phonegap |
ive already tried the phonegap repo and it doesnt work either, |
ok managed to get the repo to build,
|
Description
When I try to load the map I get the following error
Steps to Reproduce
I just created created this simple html page
and then called this in my controller
Expected behavior: [What you expect to happen]
I expected to see a map
Actual behavior: [What actually happens]
Getting just a blank page due to the above javascript error
Reproduces how often: [What percentage of the time does it reproduce?]
ALl the time
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue, e.g.:
I am getting this error in Chrome, and it seems it could be that the plugin are setting these headers and that is not allowed:
http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader-method
But I might just miss the real point as running it on my android browser i get a lot of files not found:
file://webgl-cdn1.eegeo.com/chunk/v3.0/us/2016_09_20_california_buildings_003/Ground/0/1/1/3/1/2/3/2/1/3/0/2/2/2/Ground.hcff?appinfo=Undefined%1F712172522aba50fad073946d0b4f4e4a%1F1225%1F1fb69cf6ac665b2d7d84da945ee15a9a45e30fcb%1FUndefined%1FUndefined%1FJavascript%1FUndefined%1FUndefined%1FJavascript
So are there a place I should define some variables that are undefined in the above url
The text was updated successfully, but these errors were encountered: