Note that there are some explanatory texts on larger screens.

plurals
  1. POPut locations on map around user with a certain radius - android
    primarykey
    data
    text
    <p>I am working on a GPS application and was toying with the idea of putting markers around the user like in <a href="https://ssl.gstatic.com/android/market/net.peterd.zombierun/ss-1-320-480-160-0-be320265c313592cae43145726e87c7767fd53dc" rel="nofollow">Zombie Run</a> and <a href="https://ssl.gstatic.com/android/market/com.spectrekking.light/ss-0-320-480-160-1-4be7308ade851185121fbb2e59340a77f8bdebe8" rel="nofollow">SpecTrek</a> but am completely confused about how to find out the locations around the user.</p> <p>I have been looking at the documentation for the Location class and have used the distanceTo() function for other things as well as MapView's latitudeSpan(), longitudeSpan() and getProjection() functions but I can't think how to decide on locations that are, for example, 100 metres around the user.</p> <p>As I know the users position and I am only going to be placing markers that are ~1km away from the user, at the most, can I treat the area as flat rather than ellipsoidal and so then just could take the user's longitude and latitude and +/- from them to plot a marker around them (using some basic trigonometry such as x = cos(radius) and y = sin(radius) to keep it within the radius-sized circle around the player)?</p> <p>I don't understand how long/lat correspond to actual scalar distances as in would 100long 100lat be 10 metres away from 90long 100lat? (I know these values are completely wrong but just using them to illustrate my question).</p> <p>Thanks for your time,</p> <p>Infinitifizz</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload