Gets the location by Coordinates

@param latitude
@param longitude
@return Location model
172493
public static LocationModel getLocationByCoordinates(Double latitude, Double longitude ){
        try {
            Geocoder geocoder;
            List<Address> addresses;
            geocoder = new Geocoder(QuickUtils.getContext());
            addresses = geocoder.getFromLocation(latitude, longitude, 1);

            LocationModel locationModel = new LocationModel();
            locationModel.latitude = latitude;
            locationModel.longitude = longitude;
            try{
                locationModel.address = addresses.get(0).getAddressLine(0);
            }catch(Exception ex){
                QuickUtils.log.e("empty address");
            }
            try{
                locationModel.city = addresses.get(0).getAddressLine(1);
            }catch(Exception ex){
                QuickUtils.log.e("empty city");
            }
            try{
                locationModel.country = addresses.get(0).getAddressLine(2);
            }catch(Exception ex){
                QuickUtils.log.e("empty country");
            }

            return locationModel;
        } catch (IOException e) {
            QuickUtils.log.e("empty location");
            return new LocationModel();
        }
    }
626282
function (latitude, longitude, altitude) {
                if (altitude == null) {
                    return new Location(latitude, longitude);
                }
                return new Position(latitude, longitude, altitude);
            }
958664
public void insert(final int pos, final double latitude, final double longitude) {
        ensureCapacity(size + 1);
        System.arraycopy(this.longitude, pos, this.longitude, pos + 1, size - pos);
        System.arraycopy(this.latitude, pos, this.latitude, pos + 1, size - pos);
        this.longitude[pos] = longitude;
        this.latitude[pos] = latitude;
        ++size;
    }
1373445
public function reverseByCoordinates($latitude, $longitude)
    {
        $query = $this->buildQuery('address', "{$latitude},{$longitude}");

        $response = $this->validateResponse(
            $this->getResponse($query)
        );

        return $this->buildResults($response['results']);
    }
1361458
def get_address(coords=None, **kwargs):
    
    address = None
    try:
        if (not coords) and \
            ('latitude' in kwargs and 'longitude' in kwargs) or \
                ('location' in kwargs):

            coords = kwargs.get(
                'location', (kwargs.get('latitude'), kwargs.get('longitude')))

        # transform coords
        if isinstance(coords, (list, tuple)) and len(coords) == 2:
            coords = "{}, {}".join(map(str, coords))

        geolocator = Nominatim()
        location = geolocator.reverse(coords)
        address = location.address
    except Exception as ex:
        logger.error('Fail get reverse address - {}'.format(ex))
    return address
973291
public void add(final double latitude, final double longitude) {
        ensureCapacity(size + 1);
        this.longitude[size] = longitude;
        this.latitude[size] = latitude;
        ++size;
    }
223322
private void setPosition(float latitude, float longitude, boolean updateMap, boolean updateAddress) {

        m_editValue.setLatitude(latitude);
        m_editValue.setLongitude(longitude);
        m_popupContent.displayValues(m_editValue);
        if (updateMap) {
            updateMarkerPosition();
        }
        if (updateAddress) {
            updateAddress();
        }
    }
996882
public function setPoint($longitude, $latitude)
    {
        $longitude = (float)$longitude;
        $latitude = (float)$latitude;
        $this->_filters['geocode'] = sprintf('%F,%F', $longitude, $latitude);
        return $this;
    }
720115
public static Double checkLatitude(String name, Double latitude) {
        if (latitude == null) {
            throw new IndexException("{} required", name);
        } else if (latitude < MIN_LATITUDE || latitude > MAX_LATITUDE) {
            throw new IndexException("{} must be in range [{}, {}], but found {}",
                                     name,
                                     MIN_LATITUDE,
                                     MAX_LATITUDE,
                                     latitude);
        }
        return latitude;
    }
441716
public function getCellIds($latitude, $longitude, $width = 9)
    {
        // Create s2 instance from latitude and longitude
        $s2latLng = S2LatLng::fromDegrees($latitude, $longitude);
        // Get s2 cell id from latitude and longitude
        $cellId = S2CellId::fromLatLng($s2latLng)->parent(15);
        // Calculate the size
        $size = 1 * (2 ** (S2CellId::MAX_LEVEL - $cellId->level()));
        $index = 0;
        $jindex = 0;
        $face = $cellId->toFaceIJOrientation($index, $jindex);
        $cells = array();
        $halfWidth = (int)floor($width / 2);
        for ($x = -$halfWidth; $x <= $halfWidth; $x++) {
            for ($y = -$halfWidth; $y <= $halfWidth; $y++) {
                $s2CellID = S2CellId::fromFaceIJ($face, $index + $x * $size, $jindex + $y * $size);
                $cells[] = $s2CellID->parent(15)->id();
            }
        }
        return $cells;
    }
453524
public function add($latitude, $longitude)
    {
        $this->latitude += $latitude;
        $this->longitude += $longitude;
        return $this;
    }
1170189
@Override
	public void findLocation(final String location) {
		showAlternativesView(false);
		GwtCommand command = new GwtCommand(GetLocationForStringRequest.COMMAND);
		GetLocationForStringRequest request = new GetLocationForStringRequest();
		request.setCrs(mapPresenter.getViewPort().getCrs());
		request.setLocation(location);
		request.setServicePattern(servicePattern);
		command.setCommandRequest(request);
		GeomajasServerExtension.getInstance().getCommandService().execute(command,
				new AbstractCommandCallback<GetLocationForStringResponse>() {
			public void execute(GetLocationForStringResponse response) {
				goToLocation(response, location);
			}
		});
	}
580610
def for_point(cls, point, zoom):
        """"""
        latitude, longitude = point.latitude_longitude
        return cls.for_latitude_longitude(latitude=latitude, longitude=longitude, zoom=zoom)
1076033
public function get($latitude = null, $longitude = null, $time = null)
    {
        $this->guardAgainstEmptyArgument($latitude, 'latitude');
        $this->guardAgainstEmptyArgument($longitude, 'longitude');

        $url = $this->getUrl($latitude, $longitude, $time);

        $forecast = $this->getClient()->get($url);

        return $forecast->json();
    }
680021
@Programmatic
    @Override
    public Location getLocation() {
        final String latLng = getLatLng();
        return latLng != null? Location.fromString(latLng.replace(",",";")): null;
    }
633296
public double getX01FromLongitude(double longitude, boolean wrapEnabled) {
		longitude = wrapEnabled ? Clip(longitude, getMinLongitude(), getMaxLongitude()) : longitude;
		final double result = getX01FromLongitude(longitude);
		return wrapEnabled ? Clip(result, 0, 1) : result;
	}
1153558
function (position) {
    var lat = position.coords.latitude;
    var lng = position.coords.longitude;
    geo_codeLatLng(lat, lng);
}