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

Comments

Projects
2 participants
@jywarren
Contributor

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

This comment has been minimized.

Member

mridulnagpal commented Nov 23, 2016

I would like to work on this issue

@jywarren

This comment has been minimized.

Contributor

jywarren commented Nov 23, 2016

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

@mridulnagpal mridulnagpal referenced this issue Nov 24, 2016

Closed

helper maps #1022

3 of 6 tasks complete

@jywarren jywarren referenced this issue Dec 14, 2016

Merged

helper maps, closes #1001 #1094

0 of 6 tasks complete

jywarren added a commit that referenced this issue Dec 14, 2016

helper maps, closes #1001 (#1094)
* 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