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

allow an options hash to be passed to BlacklightMaps::GeojsonExport.new #60

Merged

Conversation

ebenenglish
Copy link
Contributor

This PR aims to make local customizations a little bit easier by allowing an open hash to be passed as an argument to BlacklightMaps::GeojsonExport#new and BlacklightMapsHelperBehavior#serialize_geojson.

It allows something like this, for example:

render :partial => 'catalog/my_custom_map',
       :locals => {:geojson_features => serialize_geojson(map_facet_values, 
                                                          {partial: 'my_custom_popup_partial'})}

Where 'my_custom_popup_partial' is a partial that I want to display instead of the default partials included with the blacklight-maps gem.

Locally, I then only need to override BlacklightMaps::GeojsonExport#render_leaflet_popup_content (in this case, to look for the presence of the 'partial' key in the options hash) to get the functionality I want.

There might be other ways of going about accomplishing this (easier customization). Feedback/discussion welcome...

…ew via BlacklightMapsHelperBehavior#serialize_geojson
mejackreed added a commit that referenced this pull request Mar 11, 2015
allow an options hash to be passed to BlacklightMaps::GeojsonExport.new
@mejackreed mejackreed merged commit 413ff79 into projectblacklight:master Mar 11, 2015
@mejackreed mejackreed modified the milestone: v0.3.2 Mar 11, 2015
@ebenenglish
Copy link
Contributor Author

Thanks for the merge. That's all I've got for the moment if you want to bump the version to 0.3.2.

@cbeer
Copy link
Member

cbeer commented Mar 16, 2015

Should we spin this project out to e.g projectblacklight and give more people (e.g. @ebenenglish) the ability to release the gem?

@mejackreed
Copy link
Contributor

@cbeer 👍 for that. Any process within BL we need to go through?

@cbeer
Copy link
Member

cbeer commented Mar 16, 2015

It is done.

@cbeer
Copy link
Member

cbeer commented Mar 16, 2015

@ebenenglish what's your rubygems.org email?

@ebenenglish
Copy link
Contributor Author

@cbeer my rubygems.org username is the same as Github (ebenenglish). Let me know if you need the actual email address and I'll send it to you in a private email.

@ebenenglish ebenenglish deleted the options-for-geojsonexport branch October 14, 2015 19:09
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

Successfully merging this pull request may close these issues.

None yet

3 participants