need person's location add using google maps#48
need person's location add using google maps#48dulajsan wants to merge 7 commits intoreliefsupports:devfrom
Conversation
flood_2017-05-29.sql
Outdated
There was a problem hiding this comment.
You need to add a migration use artisan cli tool , otherwise its going to be diffcult to manage the DB upgrades / changes
gayanhewa
left a comment
There was a problem hiding this comment.
Once the migrations are added we should be good to go with this PR
app/Need.php
Outdated
There was a problem hiding this comment.
IMO latlon is a bit unreadable at first sight. Maybe something like geolocation?
There was a problem hiding this comment.
Can we use the Maps API to get the general area from the address input above?
https://developers.google.com/maps/documentation/geocoding/intro
There was a problem hiding this comment.
yes we can. but if some one enter a wrong address, it will be a problem
There was a problem hiding this comment.
Yes. It could be more work at the moment, but can something like the following be done?
- User enters an address
- An attempt is made to obtain the geolocation using that address.
- If the locations are received, the map is refreshed to show that location.
- If the location is wrong on the map, the user adjusts it.
Maybe this can be an improvement after these current changes are merged.
There was a problem hiding this comment.
That will be fine. i will work on it.
There was a problem hiding this comment.
there is an issue to add MAP API
chamilad
left a comment
There was a problem hiding this comment.
Please investigate the possibility of getting the geocode from the address itself.
|
updated to getting geocode from address. please review it and notify me |
| switch(error) { | ||
| case "ZERO_RESULTS": | ||
| x.innerHTML = "ඔබගේ ලිපිනය සොයාගත නොහැක . රතු පැහැති සලකුණ ඇදගෙන යාමෙන් ඔබ සිටින ස්ථානය ලකුණු කල හැක " | ||
| break; |
There was a problem hiding this comment.
Would these have to be i18nized? Not sure if that PR was merged.
There was a problem hiding this comment.
these are the defined errors of the geocode. i checked those errors and printed customized errors messages for these defined errors
There was a problem hiding this comment.
@chamilad Do we have i18n support at the moment? Does resources/lang contain them?
Edit : Seems https://github.com/reliefsupports/reliefsupports.org/pull/122 gives i18n support.
|
@dulajsan Please include a screenshot of the UI if possible. Thanks for implementing this! I think this will also make a good starting point for a broader map feature. |
|
@dulajsan appreciate if you can fix conflict and test once with latest code in your local. |
|
@thinkholic is this already in production? |
| } | ||
|
|
||
| </script> | ||
|
|
There was a problem hiding this comment.
@dulajsan please get an update from dev and add the translations for these
| public function boot() | ||
| { | ||
| // | ||
| Schema::defaultStringLength(191); |
There was a problem hiding this comment.
This is fine for now, this is due to the multi-byte utf support that's needed. But we need to find a mechanism to go around the default string length problem and move this concert someplace that makes sense.
Geolocation integration forked from PR #48
| function showError(error) { | ||
| switch(error) { | ||
| case "ZERO_RESULTS": | ||
| x.innerHTML = "ඔබගේ ලිපිනය සොයාගත නොහැක . රතු පැහැති සලකුණ ඇදගෙන යාමෙන් ඔබ සිටින ස්ථානය ලකුණු කල හැක " |
There was a problem hiding this comment.
added i18n support. Now we can expose requester location.
|
@dulajsan I have tested in staging and its not convenient as we search in Google maps. |
|
@danishka yes we can type in address field. Then the map will focused to relevant address. ex: If we type nugegoda, the map will focused to nugegoda |


Add GPS location when someone submit their needs. It is optional.