Titanium Community Questions & Answer Archive

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

Mapview with proper zoom level

Hi, All,

I am displaying about 10 points on MapView using Annotations, and these 10 points are in vicinity of eacher other. The farthest point should not be over 5Km from the Geolocation point.

My problem is how can I display all the points in the MapView without user's scrolling or panning. Is it controlled by the region attribute in the MapView class? I played around with different longitudeDelta and latitudeDelta values, but the MapView did not seem to change.

— asked April 2nd 2010 by HC Yen
  • iphone
  • latitudedelta
  • longitudedelta
  • mapview
  • zoom
0 Comments

6 Answers

  • Accepted Answer

    try something like this:

    mapview.setLocation({latitude:.latitude,longitude:,animate:true,latitudeDelta:0.01, longitudeDelta:0.01});
    

    But yes, it has to do with the latitudeDelta and longitudeDelta

    — answered April 2nd 2010 by Glenn Tillemans
    permalink
    1 Comment
    • if the user zooms, can detect the current value

      — commented January 30th 2012 by André Silva
  • if user change zoom,

    how do I detect the zoom level,

    — answered January 26th 2012 by André Silva
    permalink
    0 Comments
  • Is there any difference if I don't use setLocation? What if I just use Map.createView?

    I changed both latitudeDelta and longitudeDelta from 0.01 to 0.05, and the map view did not change.

    — answered April 2nd 2010 by HC Yen
    permalink
    0 Comments
  • try to change it from 0.01 to 0.001.

    the set location is basicly the same as creating it in a map view, i fire this command if i update something on my mapview.

    — answered April 2nd 2010 by Glenn Tillemans
    permalink
    0 Comments
  • I guess my other questions are :

    When I change the delta to a smaller value, is it similar to zoom in or zoom out?

    What if I set longitudeDelta and latitudeDelta to different values?

    — answered April 2nd 2010 by HC Yen
    permalink
    0 Comments
  • i made some trials, I found that when the value is bigger zooming out was made, other zooming in.

    — answered August 29th 2013 by Muhammad Hamdy
    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.