on 07-29-2015 11:08 AM
I've been trying to create a GeoMap extension for Lumira. The basic idea was to overlay D3 charts (on this instance, pie charts) over the map at specific locations. I've used the Mapbox javascript library for the map. As a simple HTML file, it works fine. It even works on the VizPacker Web IDE. But when I packed the extension, and installed it in Lumira, the map disappeared.
The pie charts appear over a blank "page". The extension is still loading the map's functionality but it just isn't loading the map. The map can be zoomed into and out of, it can be dragged too.
Upon inspecting the Dev Tool, I can see this error.
"XMLHttpRequest cannot load http://a.tiles.mapbox.com/v4/mapbox.streets.json?access_token=pk.eyJ1IjoiYW1pdGd1cHRhMjE2IiwiYSI6ImF.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:64882' is therefore not allowed access."
This seems like a Same Origin Policy issue which CORS should be able to solve, BUT the issue is, that the .json file which isn't getting loaded is being called by the mapbox.js file itself. I just mention the map type and access token. So I'm unsure as to how I will be able to implement CORS to work around this issue.
Any help would be highly appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi yash,
please follow below link.it helping to you.
regards,
Ankit Patel
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.