plz help me
Please check out this sample:
Nearby Sample | ArcGIS for Developers
// Zooms to the current location when first GPS fix arrives.
@Override public void onLocationChanged(Location loc) {
if (!locationChanged) {
locationChanged = true;
double locy = loc.getLatitude();
double locx = loc.getLongitude();
Point wgspoint = new Point(locx, locy);
Point mapPoint = (Point) GeometryEngine .project(wgspoint, SpatialReference.create(4326), mMapView.getSpatialReference());
Unit mapUnit = mMapView.getSpatialReference() .getUnit();
double zoomWidth = Unit.convertUnits( SEARCH_RADIUS, Unit.create(LinearUnit.Code.MILE_US), mapUnit);
Envelope zoomExtent = new Envelope(mapPoint, zoomWidth, zoomWidth); mMapView.setExtent(zoomExtent);
}
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.