-
Notifications
You must be signed in to change notification settings - Fork 66
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
Mapping: Country boundaries failing to display #2944
Comments
@Norric1Admin I'm not sure if this will fix all the problems, but I see there is a javascript error happening, which may be aborting the map code before it finishes. The problem is, on this line the...
should be a...
You might start there and see if there is any improvement. |
Thanks Brock, I’ve changed this! Don’t know how that happened.
#2945
|
you are a rare kind of genius 🥇 🍾 |
Thanks, glad that helped! :) |
@brockfanning I've simplified the CSV so it's just headline data and Country. Same problem, and often there is a mixture of boundaries (e.g. only England and Northern Ireland display). Is it to do with the boundary order (currently set as Country, Region, LA)? The open-sdg jquery.sdgMap.js might hold the key. P.S. The JavaScript solution seemed to work before - how do I search for JavaScript errors? Edit: Fixed this by disabling zoom on click - the high-level boundaries now display by default! Plus, the map is now easier to use. @brockfanning should this be added to open-sdg? |
I usually use the Console in Chrome to sniff out any javascript errors. If you go to any page that seems broken, and open the Console, you can usually see any javascript errors that might be happening. Often times you also click on them and get taken directly to the line of javascript with the problem (which is how I knew about the problem above). About the mapping layers problem - I don't have time just this moment to play around with it, but I'm curious if it would help to make sure that there is no "overlap" in the |
@brockfanning Thanks - I'll use the Console to see if I can get to the bottom of this. Unfortunately I already tried non-overlapping boundaries, and the overlaps are an attempt at testing the layers out. Is there any guidance you can point me to which deals with adding new boundaries please (I've read ReadTheDocs). |
@Norric1Admin From what you're describing it seems like this is probably a bug in Open SDG. Maybe I never tested out more than two layers. I dig into it some more. |
@Norric1Admin I've got some ideas, but it will need an update to Open SDG. I've started a thread there: open-sdg/open-sdg#103 |
@Norric1Admin I've submitted a PR for review on the Open SDG repo, which should help things. In addition here are some recommendations for configuring the layers:
These tips should help, but only after this PR has been merged and then included in a new release of Open SDG. |
Ta - I have approved it. My only hesitation is that the UK map will require overlaps (e.g. Country + Region). For example, while England is showing the Regions, we want Scotland to continue showing Country (map). |
Ah gotcha. Well it's worth a try. I'm just not sure if the order of the layers will cooperate. Hopefully it will just work. :) If you want to test it now, you could temporarily "un-pin" the version of Open SDG you're using. That will pull in the latest code. Or you could hold off until we properly release 0.4.0, though that may be days/weeks away. |
I'll try that ;) Is this correct? |
Yep that's right. |
@Norric1Admin Actually you'll need one other addition to the _config.yml, because of a change in Open SDG. Add this:
This is necessary because we've removed the goal images from Open SDG and put them in SDG Translations. |
Thanks for all your help today! This commit c6a602c shows that 3-layer maps are possible. Cannot unpin open-sdg yet, but I'll have another look tomorrow at this error. I suspect it is because feature/develop and master don't align. |
@Norric1Admin See my comment just above - if you look at the details on those test failures, you'll notice they are all about missing goal images. This is because in the latest open-sdg code the goal images have been removed. There's a new _config.yml setting ( |
I have decided to hold off on the unpinning for now, and incorporate this in the @0.4.0 release. We have selected maps 3.9.1 and 3.a.1, sans Country boundaries (for now). This has been a good test in adding new boundaries to the map - the method will be useful in future. |
@brockfanning
I've updated the sdg-indicators data-deploy branch config.yml file to add additional mapping boundaries. However, I can't get the new Country-level boundaries to display: http://sdg.mango-solutions.com/data-deploy/3-2-1/. In addition, the map seems to have reset to the 0,0 long/lat position. Please can you advise?
You'll notice that I commented out the County boundaries for now, as they add extra complexity. All of the boundaries are from the ArcGIS Hub, 'name/id Property' fields are consistent with the geojson, and the GeoCodes match with the CSV as far as I can see. Zoom levels are consistent with nested zooming.
Thanks Brock!
The text was updated successfully, but these errors were encountered: