-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Community events to map #7522
Community events to map #7522
Conversation
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.
Thank you for the contribution 👍
Please can you remove the placard.png
image file and use an icon that is already available in the project from React Icons https://react-icons.github.io/react-icons
We have to put a URL in the "iconURL" field and therefore putting React Component (react-icon) is not working there. Can you provide me a link to some image which you wish to use there ? We cannot put a React Component there. |
What would you suggest to do? I think you should keep placard.png file as it looks cool on the Map. |
Sorry for my slow reply, I will take a look today |
Done with necessary changes... You may review it now |
Maps had a refactor recently, so you have a conflicts, please can you resolve and also check there are not further improvements/changes you wish to make after that PR got merged #7653 |
Done with necessary changes |
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.
I spent some time debugging and found that the location API has a relatively low usage threshold, so calls to it need to be minimized. The code I suggested that worked for all the future events over several tries.
8d6e6bd
to
3f26dcf
Compare
Conflicts are solved now. |
Items I am looking at: (I will keep updating this list as I work through the PR)
|
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.
Great work 👍
I will merge to a temporary branch and make the final tweaks as I can't make changes to your fork - you are welcome to collab with me @dhruvilmehta
PR where I will make further changes #8093 |
`https://nominatim.openstreetmap.org/?addressdetails=1&q= | ||
${encodeURIComponent(provided)}&format=json&limit=1` | ||
); | ||
const coordinates = await location.json(); |
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.
For events that are added by forms, how do they get their location?
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.
We are fetching coordinates with city, state and country details. As soon as we hit the api to load data into MongoDB, it takes the events with startDate>today
or EndDate>today
and then fetches coordinates with city, state and country details.
This is what is happening, but I have not taken a look at how forms are working.
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.
Ok thanks 👍 Forms will write directly to the db so will skip the reload
script - I will look into this as I refactor the location fetching with users location
Fixes Issue
fixes #4789
Changes proposed
First of all there are many changes I am proposing to successfully solve this issue.
For testing purposes I have added these 2 parameters in this event "data\TRohit20\events\2023-06-13-DevRelCon-London.json"
Check List (Check all the applicable boxes)
Screenshots
This is how the location parameters look like (i have added "lat" and "lon" into this to locate this in map)
As soon as we click into the event shown on map we can see the details of the event.
Note to reviewers