Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Does Titanium support drawing overlays on native map view?

In the Google maps javascript library you can draw overlays of arbitrary shapes on the map. See, for example, http://code.google.com/apis/maps/documentation/javascript/overlays.html#Polygons

Google maps in the Android SDK has something similar with the Overlay class.

I would like to draw a translucent polygonal overlay on a MapView in my Titanium application. The overlay should move around with the map as the user scrolls around. So far, I only see support for drawing "push-pin" style annotations, which is not what I want.

Does Titanium support polygonal map overlays? If not, what are some alternatives? Write a native module? Embed a webview and use the Google maps Javascript API?

— asked June 28th 2010 by Carmen Wick
  • map
  • mobile
0 Comments

4 Answers

  • Accepted Answer

    This is not yet available as a core method in Ti. However, you could make a module that creates a custom annotation view for MapKit.

    My recommendation is to use Google Maps v3 API and instantiate it in a webview. I have successfully used it to overlay KML data and, most recently, have integrated Google Maps direction search into an app, which you can view here:

    http://vimeo.com/12716569

    — answered June 29th 2010 by TZ Martin
    permalink
    1 Comment
    • Hi TZ,

      Can you please share this ode for me, will be a great help . I am also making one similar kind of application which deals with the maps…My email address is ranjanmanu[at]yahoo.com

      Thanks

      — commented July 28th 2011 by manu ranjan
  • I have extended Ti.Map on Android to support polygons, routes & shapes, named overlay sets (which allow you to turn a set of annotations/polys on/off) and put in the framework to allow custom overlays from modules others might write.

    I was hoping it would get into 1.4 but Ti are snowed under so it looks like it might not make it in this release.

    If you're comfortable with compiling Ti yourself - you can follow the feature branch for it: http://github.com/dasher/titanium_mobile/commits/master-integration/

    — answered June 29th 2010 by David Ashwood
    permalink
    2 Comments
    • Has your extension for android been integrated yet? if not do you have a compiled version for win?

      — commented July 18th 2011 by josh tischer
    • Is there any update on this? I really could use routes for Android..

      — commented November 3rd 2011 by andrew royce
  • You can use a free module from marketplace. Here the docu: //http://www.netfunctional.ca/apps/mapoverlay/documentation/. The polygons are also clickable.

    — answered May 9th 2013 by Rainer Schleevoigt
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.