Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (zoomscale)
Viewing all articles
Browse latest Browse all 12

Explain ScrollView values....

$
0
0

First, let me explain what I am trying to do.

I have a US map which I have put in a scrollView. I want the user to be able to zoom in on the map, so I have made the map rather large (approx 3000x1700px).

I have set the scrollview with this code:

var mapHolder = Titanium.UI.createScrollView({
    contentWidth:2946,
    contentHeight:1680,
    minZoomScale:0.108,
    maxZoomScale:1,
    contentOffset : {x: 1300, y: 800},
    horizontalBounce:false,
    verticalBounce:false,
});
It displays centered at full scale when loaded. I wish to have it scaled to minimum scale and centered when it is loaded.

I have attempted to use 'zoomScale' set to '0.108', but this produces unwanted results. The map seems to be scaled very small and off the screen. It is also not able to scale up to full resolution.

Can someone explain how I might achieve what I am wanting to do?


Viewing all articles
Browse latest Browse all 12

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>