Monday, October 25, 2010

[android-developers] Re: Limitations of the MapView and MapActivity design

Hi,

I found that one map activity will interfere (greatly) with another
map activity if the second is started from the first. But if you
display some other non map activity between these two map activities
then both map activities seem work ok.

To get around these issues of needing to have two map activities, I
found that I had to combine the functionality of both into one and
switch overlays etc according to context. This was very messy but it
does work...

Regards

On Oct 26, 7:26 am, TreKing <treking...@gmail.com> wrote:
> On Sun, Oct 24, 2010 at 6:17 PM, Jon Perlow <per...@gmail.com> wrote:
> > The iphone version of the app shows maps in multiple places, but this is
> > not possible with the android version because of this limitation.
>
> Well, it's possible, just much more cumbersome. What you have to do is
> abstract your other views / activities that would show the map and make them
> views that you show and manage within the MapActivity. Not fun, put
> theoretically possible.
>
> Has anybody else had to make compromises to their application because of
>
> > these limitations?
>
> Yup - not too horrible yet, but as the number of different things I want to
> do with the map grows, it's getting more and more complicated.
>
> > Is the Google engineer who owns this API aware of the limitations?
>
> I'm sure - they even documented it =P
>
> > Are there any proposals to fix it?
>
> Don't hold your breath. It doesn't look like the Maps API gets updated. It
> is what it is.
>
> >  Is the best workaround simply to use a WebView that uses the javascript
> > API?
>
> That, or as I mentioned, abstract your other functionality to work within
> the one MapActivity. I think the Strategy Pattern might be a good fit for
> this.
>
> --------------------------------------------------------------------------- ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate