Skip to content
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

Implement Map visualization of the journalists worldwide #3

Open
acorbi opened this issue Jun 23, 2014 · 6 comments
Open

Implement Map visualization of the journalists worldwide #3

acorbi opened this issue Jun 23, 2014 · 6 comments
Assignees

Comments

@acorbi
Copy link
Collaborator

acorbi commented Jun 23, 2014

Using mapbox/openstreepmaps/leaflet or any other js mapping framework, an interactive map could be presented for the user to browse through the list of journalists geografically.

Map view (which should be optimally fullscreen) and Filter view (current) could be switched using a toggle button

@acorbi acorbi self-assigned this Jun 23, 2014
@smkraus
Copy link
Contributor

smkraus commented Jun 23, 2014

+1 brilliant idea, not sure what's the easiest solution here, play around with d3? what @vied12 has built here might be an inspiration jplusplus/jpp-birthday-2013

@acorbi
Copy link
Collaborator Author

acorbi commented Jun 23, 2014

Yeah, currently i am thinking about the possibilities, main challenge would be to geocode the "country, city" in order to georeference the pins on the map. Any suggestions with this? You know any service without API limitations?

@smkraus
Copy link
Contributor

smkraus commented Jun 23, 2014

while cosmin is still adding data by hand, we can probably just use something like batch geocoding.

For something more systematic: I think Mapquest doesn't have any API limitations (as opposed to Google).

@rotsee
Copy link
Member

rotsee commented Jun 23, 2014

If you make the API call from the client,there is virtually no limit on the Google API (we just used on as site with 300 000+ visits in 12 hours, with no problems). Also very tolerant for spelling errors, etc.

@smkraus
Copy link
Contributor

smkraus commented Jun 23, 2014

excellent, thanks @rotsee

acorbi pushed a commit that referenced this issue Jul 2, 2014
As described in issue #3, the leaflet mapping library has been imported
in the project in order to represent on a world-map, the position of
the results of a certain filter/search action. For that, following
steps have been done:
- leaflet-0.7.3 library included
- MarkerCluster leaflet plugin included.
- Button added in top bar to switch from/to  map/grid view.
- mapview.js has been created to host the code related to the map.
- in pinky.js, an initMap function has been added. Also, the code
snippet where the card UI elements of each article on the grid has been
encapsulated and named as _renderArticleCardHtml for reuse. Another,
and similar function, called _renderArticlePopupHtml has been created
to return the HTML content of the popups in the map. At the end of the
renderTags method, the function codeAddressFromArticle will be called
in order to geocode each of the results of the filter. The service used
for this was: http://www.mapquestapi.com/geocoding/
@acorbi
Copy link
Collaborator Author

acorbi commented Jul 2, 2014

Implemented on commit #e68441d8494a901ac9f4b070bf2693e643de16c0. I am not 100% happy with the layout. By the moment there is a button to switch between mapview and gridview. It would be nice to have both views been shown at the same time.

Another issue concerning UI are the popups (appear when clicking on a marker), they are currently quite long and it would be nice to have the details to the right of the picture. Can anybody do this? The relevant function to edit would be: pinky.js/_renderArticlePopupHtml()

BTW: I used Mapquest geocoding service, they do not have any limits as google has. And also this leaflet plugin for the clustering of the POIs: https://github.com/Leaflet/Leaflet.markercluster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants