Я добавил JTS -зависимости, которая является org.locationtech.jts . Вот мой код: < /p>
Код: Выделить всё
// get the POINT Z (642823.3317 937067.5592999998 0)
String geometryPoints = record.getGeometry();
// parse the points using JTS
WKTReader reader = new WKTReader();
Geometry geometry = reader.read(geometryPoints);
if (geometry instanceof Point) {
double lat = geometry.getCoordinate().y;
double lng = geometry.getCoordinate().x;
LatLng position = new LatLng(lat, lng);
mMap.addMarker(new MarkerOptions()
.position(position)
.title(record.getKilometerPostId())
.snippet(record.getXsp())
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));
}
Спасибо за помощь!
Подробнее здесь: https://stackoverflow.com/questions/795 ... etry-point