allow an options hash to be passed to BlacklightMaps::GeojsonExport.new #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andBlacklightMapsHelperBehavior#serialize_geojson
.It allows something like this, for example:
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...