Does Titanium support drawing overlays on native map view?

You must Login before you can answer or comment on any questions.

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?

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 3 years ago by TZ Martin
answer 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 2 years ago 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 3 years ago by David Ashwood
answer permalink
2 Comments
  • Has your extension for android been integrated yet? if not do you have a compiled version for win?

    — commented 2 years ago by josh tischer

  • Is there any update on this? I really could use routes for Android..

    — commented 2 years ago 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.

Your Answer

Think you can help? Login to answer this question!