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

Separate map template out into a unique partial #1001

Closed
jywarren opened this issue Nov 21, 2016 · 2 comments
Closed

Separate map template out into a unique partial #1001

jywarren opened this issue Nov 21, 2016 · 2 comments

Comments

@jywarren
Copy link
Member

@jywarren jywarren commented Nov 21, 2016

Small Leaflet maps are currently shown in sidebars here (scroll to bottom, look at left side):

https://publiclab.org/search/lima

The code driving that is here:

https://github.com/publiclab/plots2/blob/master/app/views/sidebar/_related.html.erb#L80-L108

We should make a template helper likerender_map(lat, lon, items) which accepts an array of items that have .lat and .lon methods, so we can use maps in more places.

The helper could go in: https://github.com/publiclab/plots2/blob/master/app/helpers/application_helper.rb

Eventually we could use this to generate an inline tag that shows a map, just like they currently show a table of results: https://publiclab.org/wiki/power-tags#Inline+power+tags

@mridulnagpal
Copy link
Member

@mridulnagpal mridulnagpal commented Nov 23, 2016

I would like to work on this issue

@jywarren
Copy link
Member Author

@jywarren jywarren commented Nov 23, 2016

Great, we'd love to have your help on this!

@mridulnagpal mridulnagpal mentioned this issue Nov 24, 2016
3 of 6 tasks complete
@jywarren jywarren mentioned this issue Dec 14, 2016
0 of 6 tasks complete
jywarren added a commit that referenced this issue Dec 14, 2016
* helper maps

* Update Gemfile

* Update application_helper.rb

* Add files via upload

* Update _leaflet.html.erb

* Update _leaflet.html.erb
@jywarren jywarren added this to the Geographic features milestone Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Outreach and coordination
  
recently-completed
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants