Commit 930c4d1
feat: add AMap Autocomplete for precise location selection
Problem: Ambiguous addresses like "陈村地铁站" were being geocoded to wrong
locations (Zhaoqing instead of Foshan Shunde).
Solution: Implement AMap Autocomplete that lets users select exact locations
from a dropdown. Selected coordinates are sent directly to backend, bypassing
geocoding entirely.
Changes:
- api/index.py: Add LocationCoord model, /api/config/amap endpoint with
separate AMAP_JS_API_KEY for frontend maps
- public/meetspot_finder.html: Integrate AMap AutoComplete plugin (note:
capital C in AMap 2.0), capture coordinates on selection
- app/tool/meetspot_recommender.py: Accept pre_resolved_coords parameter,
skip geocoding when coordinates provided
- data/address_aliases.json: External file for address mappings
- CLAUDE.md: Document postmortem system and address alias sources
Tested: "陈村北(地铁站)" now correctly resolves to Foshan Shunde (113.245,22.976)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 2e3248a commit 930c4d1
File tree
5 files changed
+3907
-3485
lines changed- api
- app/tool
- data
- public
5 files changed
+3907
-3485
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
140 | 148 | | |
141 | 149 | | |
142 | 150 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
149 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
150 | 184 | | |
151 | 185 | | |
152 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
196 | 204 | | |
197 | 205 | | |
198 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
199 | 216 | | |
200 | 217 | | |
201 | 218 | | |
| |||
205 | 222 | | |
206 | 223 | | |
207 | 224 | | |
| 225 | + | |
| 226 | + | |
208 | 227 | | |
209 | 228 | | |
210 | 229 | | |
| |||
267 | 286 | | |
268 | 287 | | |
269 | 288 | | |
| 289 | + | |
270 | 290 | | |
271 | 291 | | |
272 | 292 | | |
| |||
770 | 790 | | |
771 | 791 | | |
772 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
773 | 808 | | |
774 | 809 | | |
775 | 810 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
782 | 818 | | |
783 | 819 | | |
784 | 820 | | |
| |||
962 | 998 | | |
963 | 999 | | |
964 | 1000 | | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
965 | 1029 | | |
966 | 1030 | | |
967 | 1031 | | |
| |||
0 commit comments