私の英語があまり上手ではない私の質問を理解していただければ幸いです。
とにかく、私は場所を持つアプリケーションに取り組んでいます。もっと学ぶのに役立つ唯一の楽しいアプリです。
これは iOS アプリケーションであり、サーバーは WebObjects/WOnder アプリケーション (Java) です。私がやろうとしているのは、iOSアプリでユーザーの場所を取得してから、データをサーバーに送信することです。サーバーでは、データベースから注釈ポイントを取得します。ただし、ユーザーの場所の近くにある注釈のみを送信します。
私の唯一の問題は、ユーザーの近くの場所を計算する方法がわからないことです。私はたくさんグーグルで検索しましたが、うまくいくものは見つかりませんでした。ユーザーの「境界ボックス」を私に与えるものだけ。
//To calculate the search bounds...
//First we need to calculate the corners of the map so we get the points
CGPoint nePoint = CGPointMake(self.mapView.bounds.origin.x + mapView.bounds.size.width, mapView.bounds.origin.y);
CGPoint swPoint = CGPointMake((self.mapView.bounds.origin.x), (mapView.bounds.origin.y + mapView.bounds.size.height));
//Then transform those point into lat,lng values
CLLocationCoordinate2D neCoord;
neCoord = [mapView convertPoint:nePoint toCoordinateFromView:mapView];
CLLocationCoordinate2D swCoord;
swCoord = [mapView convertPoint:swPoint toCoordinateFromView:mapView];
Javaでそれを行う方法を知っている人はいますか?