-
Notifications
You must be signed in to change notification settings - Fork 20
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
Maps work - improvement and strengthening of the maps used in Akvo RSR #113
Comments
We should also be looking at #85 when completing this issue. |
- Made user of the API's limit and offset features - Made akvo-maps.js pass jslint . #113
Now there is a Django template tag "map" that renders a project map with the following syntax: For maps with all projects: On page load a javascript will grab all map elements from the page and render them with the correct data from the template tag. I'm consider renaming 'map' to akvomap' or something more namespacy. |
The large maps can't be zoomed with the scroll wheel any more. Was this a conscious decision or just an oversight? I'd really like to have it, unless there's a technical reason for disabling it. |
For me I find it annoying to scroll down on the page and then suddenly start to zoom the map instead. But didn't realise that I changed behaviour. Fix is just to change https://github.com/akvo/akvo-rsr/blob/develop/akvo/mediaroot/akvo/js/src/akvo-maps.js#L188 from false to true |
In the general case I agree, in-page scrolling sucks. But this is a map, not some random iframe with a list that didn't fit. So I think it's a tradeoff worth doing since the zooming of a map is so very awkward otherwise. It might be argued that it shouldn't be active on the partner sites home pages, but for the large all-project/org maps where there's nothing but the map on the page and the need to scroll is minimal, I think it should definitely be enabled. |
I agree that we should enable this. I see from the line reference from Daniel that this should be a relatively easy fix, so I will make this now. Cross your fingers guys - I'm about to edit the code! :) |
Adding back the functionality to enable Scroll-Wheel Zooming on the maps. Subsequent maps changes can look into differentiating this functionality between large and smaller maps.
This works now in UAT - and doesn't seem to have affected maps on project pages, but has on the Project listing pages. :) |
Map zoom on project main page is too detailed. I think it's maxed in. Compare http://www.akvo.org/rsr/project/674/ and http://aqua4all.akvotest3.org/en/project/674/ which are good with http://uat.akvo.org/rsr/project/674/ |
Add non-minified jquery files to enable debugging. Change loading of jquery to load non-minified versions if DEBUG = True. Load Google maps js conditionally at the end of rsr/base.html to prevent loading twice when the script is already included in a template tag.
Change the API call for the "large" maps to only retrieve the project or organisation objects and get them all in one request. Change the pin rendering to only place a pin for the primary location on the "large" maps. Fix small problem with the path to pin images.
All single maps displaying locations for a single project or organisation should now have the same default zoom level (8). If there are locations very far apart zoom level may be lower.
Refactor the parameters for the tag Get the marker_icon param working Make the home page markers small Fix the templates to use the new tag params
Add more comments describing the calling aPI for the map template tag and some comments on the inner workings of the different parts Get rid of warnings using jslint Remove old code
world.SITE_UNDER_TEST is used to identify the domain of the server the tests are run on. This was accidentally changed to be a full page URL causing breakage in older tests. Replace a few tabs with spaces. Small refactoring of one step in project_navigation_steps.py
Add 'map_for_project' and 'map_for_organisation' resources that produce a lean dataset for use with the API driven maps. The resources don't include any foreign key data except the locations and also excludes a number of long text fields.
Replace the home page map with an image of the map, and set up an image map for the links on it.
We have multiple locations on Akvo.org maps: |
Partner sites uses different and older maps code. The new maps code uses RSR API but since it only returns data (and links) for normal "Normal" RSR, we can't use the same maps code. We need to discuss if there is a need for partner sites specific API or how to attack this problem. |
The global maps are zooming out too much, probably depending on the pins being more widely distributed. Fix by adding minZoom to dynamic map type. The global maps are centering in weird places, probably depending on how the pins are distributed. Fix by adding centering on LatLng 0.0, 0.0.
When the global map for projects is loaded quite a few tiles are missing initially in Chrome/Safari if zoom is set to 2. Fix by setting zoom to 3 even if this results in the map being a bit more zoomed than needed initially in some cases.
Code reviewed. |
We need to perform several tasks to improve the functionality of maps in RSR. Much work on this has been done, but the following list contains requirements that need to be fulfilled by this work.
There are additional existing requirements which are not mentioned here. These include standard requirements such as the ability to view pins relating to organisations on a map. If further clarification of these requirements is needed, please speak to @adriancollier.
These requirements are taken from the following GitHub issues which are closed but can be viewed for reference:
#8 #17 #19 #20 #44 #57 #60 #97
The core bulk of this work has been estimated to take around 2 weeks. Formal initiation of this work will be given shortly along with the assigning of this issue.
A comment at this time will be added to provide the estimated delivery time.
The text was updated successfully, but these errors were encountered: