API карт Google не размещает маркер в точном месте.

Мой код должен определять местоположение пользователя и ставить маркер на карте при входе в приложение. Мое значение местоположения всегда равно нулю и никогда не получает значение.

if (location != null) {
                lat = (int) (location.getLatitude() * 1E6);
                longi = (int) (location.getLongitude() * 1E6);
                GeoPoint ourLocation = new GeoPoint(lat, longi);
                OverlayItem overlayItem = new OverlayItem(ourLocation, "AYO",
                        "Whats good yo");
                CustomPinpoint custom = new CustomPinpoint(d, CampusMap.this);
                custom.insertPinpoint(overlayItem);
                overlayList.add(custom);

            } else {
                Toast.makeText(CampusMap.this, "Couldn't get provider",
                        Toast.LENGTH_SHORT).show();

            }

        }
6
задан The Tokenizer 23 May 2014 в 04:53
поделиться