| | |
| | | List<Location> list = new ArrayList<>(); |
| | | // 1米=0.0000089932 |
| | | for (Location loc : vocAddrs) { |
| | | if (Math.abs(loc.getLon() - x) <= 0.00009 && Math.abs(loc.getLat() - y) <= 0.00009) { |
| | | if (Math.abs(loc.getLon() - x) <= 0.0009 && Math.abs(loc.getLat() - y) <= 0.0009) { |
| | | list.add(loc); |
| | | } |
| | | } |
| | |
| | | <select id="selectByXY" resultMap="locationResult"> |
| | | <include refid="locationSql"></include> |
| | | <where> |
| | | lon between (#{x} - 0.00009) and (#{x} + 0.00009) |
| | | lon between (#{x} - 0.0009) and (#{x} + 0.0009) |
| | | and |
| | | lat between (#{y} - 0.00009) and (#{y} + 0.00009) |
| | | lat between (#{y} - 0.0009) and (#{y} + 0.0009) |
| | | </where> |
| | | </select> |
| | | |