Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{{#mapbox-gl as |map|}}
{{map.on 'click' (action 'handleMapClick')}}
{{map.on 'mousemove' (action 'handleMouseMove')}}
{{!-- Two yields implicitly merge the mapbox-gl addon's block params API with our own
internal extensions --}}
{{yield map}}
{{yield (hash
dynamic-tiles=(component 'mapbox-gl-dynamic-tiles'
map=map
mapInstance=mapInstance
)
address-search=(component 'address-search' map=map)
filter-distance-from-point=(component 'filter-distance-from-point' map=map)
)}}
{{/mapbox-gl}}
{{#projects-map as |map|}}
{{!-- Regular mapbox-gl addon APIs --}}
{{map.call 'fitBounds' bounds (hash padding=20)}}
{{!-- Some project-specific extensions --}}
{{map.address-search
onSelectSearchResult=(action section.delegate-mutation
(action 'handleSearchResultSelect' 'distance_from_point')
)
onClearSearchResult=(action section.mutateWithAction)
}}
{{map.filter-distance-from-point
pointGeometry=distance_from_point
radius=radius_from_point
shouldQueryFullMap=section.filterIsActive
onRadiusFilterClick=(action section.delegate-mutation
(action 'handleRadiusFilterClick' 'distance_from_point')
)
}}
{{/projects-map}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.