-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: Fixed maps on events & explore page #3271
Conversation
72bfec2
to
095d1ee
Compare
@@ -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|}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have hardcoded lat/lng here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the hardcoded lat/lng gives an empty map. According to the docs, there seems to be an initial value given to the component everywhere.
https://www.emberobserver.com/addons/ember-g-map
There needs to be an initial value given I guess.
@@ -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|}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove hardcoded lat/lng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrsaicharan1 please update your branch. I think netlify is fixed now so tests can run properly
Also, one thing which few devs faced earlier was during event creation. The lat and long. of the event was not getting stored instantly and so the map was not getting rendered. Is it still persistent?
Done! Yeah, It's not getting stored there. I will open a separate issue for this & work on it. |
@uds5501 @shreyanshdwivedi @CosmicCoder96 This is ready for another review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the hard-coded lat/long aren't any issue, it looks fine
Fixes #3159
Fixes #3270
Short description of what this resolves:
Fixes the map issue by allowing the Maps API to handle the location->(lat,lng) conversion (Event Page)
Refactored the map component to ensure that it is dynamic enough to pan to the correct map bounds. (Explore Page)
![Screenshot 2019-07-12 at 1 42 52 PM](https://user-images.githubusercontent.com/25197147/61113078-f6970a00-a4aa-11e9-9ba9-b1d1a31a91f5.png)
Checklist
development
branch.