12-04-2012 08:08 PM
12-04-2012 09:17 PM
It's quite easy (and hard)
The easy bit it getting the GPS co-ordinates and feeding them into a map
I've got a little test mapping app I wrote in the summer that follows me around showing me where I am
The problem you have is that GPS is unreliable - if you take only the readings you get you bounce around a lot
You can sit in the same spot and watch yourself move all over the place (not useful)
There are ways to smooth out this issue, the best being a Kalman Filter - sadly this ain't practical in real time using JavaScript
The next best is Least Mean Squares - which I've actually built into my test app
These sorta guess where you are based on where you were and as such get rid of the bouning around problem
Next you need to know where you wanna go / mark
This requires the exact lat / long of the <whatever>
Simple example - mark where you parked your car from the app
Go walkies, get lost - switch to car finder mode and you can map yourself and your target
Getting a bit more complex you can use the magnetometer to point you at your target
This is like having a compass that points at the target (more complex maths)
Of course if there's an obstacle in the way you'll have to manouver around it to hit the target
12-04-2012 11:26 PM
12-05-2012 03:11 PM
1. GPS api
2. App goes online to call home and tell where you are.
2. Backend server replies with nearby places of interest. <- lot of work, investigate other mapping services for this.
Problems:
GPS comes in 2 flavours - Absolute and Relative. Absolute uses an actual GPS hardware to find you. Relative uses your ISP and WiFi etc... to find you. Absolute is more accurate but you can't force that only, because you'll limit your apps reach in terms of users with the right device. Relative can be way wrong.
Having a successful backend server calculating nearby locations and actually filling it with places of interest would take money and contacts. Best you investigate google and other services which provide this type of thing.
Webworks apps have a memory limit which is exceeded by many of the map providers so you have to use something like leaflet (google leaflet maps) which compresses the map tiles for memory usage if you want to include maps in your app.
12-06-2012 02:16 PM
Check out my "Maps" sample. It shows how to do this exact thing ![]()
https://github.com/blackberry/BB10-WebWorks-Sample
12-07-2012 09:34 PM
See the other thread on this (no point typing everything twice)
GPS is admitted as broken but in the process of being fixed before gold SDK
12-15-2012 07:17 AM
There are several topics related to this so I've made a new post so I don't have to write it many times
I've tried it on my Dev Alpha and - yahoo - callback with positioning!