moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 337 forks source link

Navigation #346

Closed Stashare closed 8 years ago

Stashare commented 8 years ago

Nice work, have been looking for this for a long time... i want to move from point A to point B, i have located the two points on the tileview and a dynamic path has been drawn, so is it possible to provide real time position of the user as he moves to point B like in Google Maps?

Caspain commented 8 years ago

points.add( new double[] {-75.1489070, 39.9484760} ); points.add( new double[] {-75.1494000, 39.9487722} ); points.add( new double[] {-75.1468350, 39.9474180} ); points.add( new double[] {-75.1472000, 39.9482000} ); points.add( new double[] {-75.1437980, 39.9508290} ); points.add( new double[] {-75.1479650, 39.9523130} ); points.add( new double[] {-75.1445500, 39.9472960} ); points.add( new double[] {-75.1506100, 39.9490630} ); points.add( new double[] {-75.1521278, 39.9508083} ); points.add( new double[] {-75.1477600, 39.9475320} ); points.add( new double[] {-75.1503800, 39.9489900} ); points.add( new double[] {-75.1464200, 39.9482000} ); points.add( new double[] {-75.1464850, 39.9498500} ); points.add( new double[] {-75.1487030, 39.9524300} ); points.add( new double[] {-75.1500167, 39.9488750} ); points.add( new double[] {-75.1458360, 39.9479700} ); points.add( new double[] {-75.1498222, 39.9515389} ); points.add( new double[] {-75.1501990, 39.9498900} ); points.add( new double[] {-75.1460060, 39.9474210} ); points.add( new double[] {-75.1490230, 39.9533960} ); points.add( new double[] {-75.1471980, 39.9485350} ); points.add( new double[] {-75.1493500, 39.9490200} ); points.add( new double[] {-75.1500910, 39.9503850} ); points.add( new double[] {-75.1483930, 39.9485040} ); points.add( new double[] {-75.1517260, 39.9473720} ); points.add( new double[] {-75.1525630, 39.9471360} ); points.add( new double[] {-75.1438400, 39.9473390} ); points.add( new double[] {-75.1468240, 39.9495400} ); points.add( new double[] {-75.1466410, 39.9499900} ); points.add( new double[] {-75.1465050, 39.9501110} ); points.add( new double[] {-75.1473460, 39.9436200} ); points.add( new double[] {-75.1501570, 39.9480430} );

The qustion is wish to ask is this, how do i dynamically find specific lat and lng values. Eg, like a click on the map. Is there some method like,onClick with this request?

thank you.

moagrius commented 8 years ago

@Stashare sure, just use a custom View to represent the user, add it with addMarker, grab the location using standard gps retrieval methods and move it with updateMarker

@Caspain yes, see the CoordinateTranslater information at the bottom of the FAQ: https://github.com/moagrius/TileView/wiki/FAQ

both - is there a reason these questions are in the same issue?

Stashare commented 8 years ago

thanks Mike