Giter Site home page Giter Site logo

bigarrow's People

Contributors

jimburton avatar up-server avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bigarrow's Issues

Optimise location searches

Currently, the Activities that use a LocationManager (all the PlaceSearchActivities) get updates when the location has changed by 50m or more, and at most once every 10 seconds. We can optimise this by setting the distance buffer on the LocationManager to a value that is relative to the LatLngBounds of the map. The minimum distance for notification should be relative to bounds, e.g. half. That way, if the map envelope is large (e.g. in an area with sparse places API data), location updates will only be needed when the user moves by, e.g., 500m. When the map envelope is small (e.g. on a city street with lots of nearby places) it would receive updates after moving, e.g., 20m.

google-play-services.jar

I think it's missing from libs/ or is it done purposefully?

Also didn't know where to put, when people do edit their libs to include google-services, they need to include to export too, otherwise BigArrow.jar won't find it when run. Thought this note might be useful for students

Draw better arrow

Make the arrow look more like the ones in the screenshots. We need three arrays of vector coordinates, one which draws an arrow pointing up/down, one which draws and arrow up/down and off to the left and one which draws and arrow up/down and off to the right.

Drawing arrow using Google Directions API

Instead of drawing the arrow so that it points directly towards the location, use the Directions API to point in the direction of the first part of the route to get there on foot. Update this accordingly as the location changes.

Arrow direction inaccurate and drifting

The direction in which the arrow points seems to be inaccurate. The code that calculates the angle is in BigArrowGLES20Activity.

The direction also appears to drift a little over time, without changing the location. To recreate, open the BigArrow activity, wait for the search to complete then wiggle the device around a bit.

Arrow flips by 180 degrees

The arrow sometimes flips 180 degrees, especially when pointing straight up or down. See BigArrowGLES20Activity (where the angles are calculated) and opengles.MyGLSurfaceView (where the rotation is applied and the drawing is done).

Extending documentation

Add info to README.md on setting up the project, links to info on installing the Play Services API, getting API keys and why you need two keys etc. Maybe put some info on GPS vs WIFI location and why the app may be using an old or inaccurate location at various times.

Caching responses from the Places API

We should construct a way of caching all responses from the Places API, i.e. place searches, full details for a single place, and photos.

Place details and photos aren't location dependent so these should be cached in a WeakHashMap (i.e. garbage collectable) where the key is the URL that was used to retrieve it and the value is the parsed response (e.g. a PlaceDetails object) . There should a size limit on the cache, a LRU strategy for expiring contents and a means to empty the cache directly.

Place searches are location dependent. We can probably still use the URL as the key but, if everything except the location matches we need some idea of when we can reuse the results form a search that was "close enough" to the current location. In order to do this, we probably need a version of PlacesAPISearch.search that takes the current bounds of the map and works out the difference in location relative to that. Place searches that come through the list activity will be trickier, since we have to guess what a significant change in location is.

Data wants to be free!

Point for discussion

It would be really nice to stop using Google for the places search and maps. This might come at a cost (features missing from the APIs we use, things not looking as slick, less data available) but I think it's worth looking into. Other than the warm feeling provided by using free/community data and services, we might also benefit from fewer restrictions on how we use, e.g., a directions API (Google naturally want to monetise theirs).

Potential replacement services/APIs

Feel free to add to this list.

. Maps: http://wiki.openstreetmap.org/wiki/Android
. Places: http://developer.wikitude.com/en_GB

Add AUTHORS file

Including contributors and links to the various other sources code came from, like the Pro Android Augmented Reality book.

Implement ignoring/unignoring of places

Users should be able to "ignore" and "unignore" a place, meaning that the place in question doesn't show up in any activity (BigArrow, List or Map) until unignored. This is a pretty big feature, as it requires adding a database to the app and making some new screens.

A widget for ignoring should appear on the PlaceDetailsActivity. Tapping this adds a row to the database in a table that probably only needs two columns, _id (autoincrement column) and placeid. Ignored places should be filtered out of the PlaceSearch results. Since we now want to present the 20 nearest non-ignored places, the easy way round it would be to select 20+count(ignored), remove any ignored places from the results then present the nearest 20. This is a nasty kludge though, because we will often be retrieving more records than we need and if someone ignores hundreds of places it would be impractical.

We then need a new Activity that lists the ignored places with an option to unignore them, removing the record from the database.

Increase initial map bounds

If the map covers a fairly large area then the myLocation marker is only just visible and the "You are here" label is often off the map. Add a buffer to the initial bounds.

Code cleanup for place-place details easy interaction

I think generalised code is much cleaner and less prone to errors. We might have an enum that includes all details about a place e.g. NAME, ADDRESS with extra info fields (extended enums) so we can easily retrieve details using dynamically generated code, not sure how we'll deal with image types but I should be able to figure it out, for the time being I'm considering only data that can be toString() ified.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.