Skip to content

Commit

Permalink
Fixed maps on events & explore page
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsaicharan1 committed Jul 12, 2019
1 parent 9a5ee82 commit 72bfec2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
11 changes: 10 additions & 1 deletion app/components/public/event-map.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import Component from '@ember/component';

export default Component.extend({
classNames: ['ui', 'stackable', 'grid']
classNames: ['ui', 'stackable', 'grid'],
actions: {
onLocationChangeHandler(lat, lng) {
this.setProperties({
zoom: 17,
lat,
lng
});
}
}
});
2 changes: 1 addition & 1 deletion app/templates/components/explore/side-bar.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="map item">
{{#g-map lat=37.7833 lng=-122.4167 zoom=2 address=location class='google-maps' as |context|}}
{{#g-map markersFitMode='live' lat=37.7833 lng=-122.4167 zoom=2 address=location class='google-maps' as |context|}}
{{g-map-address-marker context address=location onLocationChange=(action 'onLocationChangeHandler')}}
{{/g-map}}
</div>
Expand Down
8 changes: 6 additions & 2 deletions app/templates/components/public/event-map.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{{#if event.isMapShown}}
<div class="eight wide column event-map">
<h1>{{t 'Getting Here'}}</h1>
{{#g-map lat=event.latitude lng=event.longitude zoom=15 gestureHandling='cooperative' streetView='StreetViewPanorama' as |context|}}
{{g-map-marker context lat=event.latitude lng=event.longitude}}
{{#g-map markersFitMode='live' lat=37.744 lng=-122.4367 address=event.locationName zoom=2 class='google-maps' as |context|}}
{{#g-map-address-marker context address=event.locationName as |markerContext|}}
{{#g-map-infowindow markerContext}}
{{event.locationName}}
{{/g-map-infowindow}}
{{/g-map-address-marker}}
{{/g-map}}
</div>
{{/if}}
Expand Down

0 comments on commit 72bfec2

Please sign in to comment.