Android Open Source - android-gmaps-addons Location Utils






From Project

Back to project page android-gmaps-addons.

License

The source code is released under:

Copyright (c) 2014 Jonathan Baker Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Sof...

If you think the Android project android-gmaps-addons listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cocoahero.android.gmaps.addons.util;
//from  w  ww  .  java2  s  .  c om
import android.location.Location;

import com.google.android.gms.maps.model.LatLng;

public class LocationUtils {

    /**
     * Converts the given {@link Location} to a {@link LatLng}.
     * 
     * @param location A {@link Location} instance.
     * @return a {@link LatLng} with matching latitude and longitude of the
     *         given {@link Location}.
     */
    public static LatLng toLatLng(Location location) {
        return new LatLng(location.getLatitude(), location.getLongitude());
    }

}




Java Source Code List

com.cocoahero.android.gmaps.addons.mapbox.MapBoxOfflineTileProvider.java
com.cocoahero.android.gmaps.addons.mapbox.MapBoxOnlineTileProvider.java
com.cocoahero.android.gmaps.addons.osm.OpenStreetMapTileProvider.java
com.cocoahero.android.gmaps.addons.util.LatLngBoundsUtils.java
com.cocoahero.android.gmaps.addons.util.LocationUtils.java
com.cocoahero.android.gmaps.addons.util.PolygonUtils.java