I've started playing with MapView and MapTrackView and I seem to keep running into road blocks. Seems like there are too many limitations with the current implementation. It's trying to do a lot of things for you but makes it very hard to customize as has been discussed in other threads. Such as having no way to get the actual area that is being displayed. Also means that the only way to track your current position is through MapTrackView. Trying to track your current position with MapView and manually setting the position with setMapVisibileArea becomes impossible once the user has zoomed in or out as you don't know what the zoom factor is or what should be visible. Am I missing something here?
But the immediate problem I'm having is with MapTrackView. This may be just the simulator but as I have no device that currently supports the maps, I can't verify. I can add polylines in the initialize function but not later. I'm trying to add the current track as the polyline and reset it in the onUpdate function as it changes every second. This works just fine if I just use a MapView. But when I use the MapTrackView, any polyline I set other than in the initialize function never gets drawn. In fact, if I do set one in initialize, it never gets replaced by the one I set in the onUpdate.
Again, this works just fine with setting/drawing the polyline in a simple MapView but not in MapTrackView.
I started off trying to do all my own drawing of the track until I realized the problem with the setMapVisibleArea only being a suggestion so no way to actually know what the scaling is. Being able to get the REAL visible bounds seems like an absolute minimum in functionality. Especially given that zooming in/out will be different on every device.
Maybe even just publishing for each device what the available zoom factors are. Except I suspect they could change over time or with different map sets.