Discussion Forums  >  Uncategorized

Replies: 8    Views: 350

jedijaded
I hate code!
Profile
Posts: 12
Reg: Mar 12, 2011
La Crosse, WI
120
03/29/11 12:02 PM (14 years ago)

Google Map Help on Zoom

Now that I have the maps working(android)I need a # for a up close default zoom. I tryed .002 and that was still pretty far out. I'd like it do be fairly close up for default zoom. Any Ideas?
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/29/11 12:12 PM (14 years ago)
Are you using the default zoom in buzztouch? Or hardcoding it into the Android app? If you are going the first route, you need to use whole numbers and 20-22 will be close and 24 is the max.
 
jedijaded
I hate code!
Profile
Posts: 12
Reg: Mar 12, 2011
La Crosse, WI
120
like
03/29/11 12:18 PM (14 years ago)
Ya in buzztouch it starts at .002 but that is WAY to far out. It say if you go up in #'s it gets farther out so I tryed .002 and that didn't work. That is funny because my other questtion is how I could hardcode it in eclipse so I dont have to keep re-compiling it. Do you know where I could do that in the code on eclipse?
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/29/11 01:02 PM (14 years ago)
I haven't worked with andriod's Eclipse yet. Buzztouch is set by default unless you have only one point. Otherwise you have to hardcode it after you download the eclipse package or set up your map to point to a PHP file to grab points in a csv file and fill the map. There you can express what zoom level you want.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 12:32 AM (14 years ago)
You may have noticed that on Android the 'default zoom' doesn't do much. To hard-code the zoom level, on a map with only one location marker... do this a) Find Screen_LocationMap.java in the /src folder of the Exlipse project b) Scroll down to around line 383 and look for mapController.animateTo(items.get(0)); c) Just below that (press enter after that line to give yourself some space... Add this: mapController.setZoom(15) Experiement with the 15, change it as needed. This should do it.
 
jedijaded
I hate code!
Profile
Posts: 12
Reg: Mar 12, 2011
La Crosse, WI
120
like
03/30/11 08:11 AM (14 years ago)
Ya....lol. Sweet though thx for all the help I think i'm good till the next problem. THX guys!
 
jedijaded
I hate code!
Profile
Posts: 12
Reg: Mar 12, 2011
La Crosse, WI
120
like
03/30/11 08:22 AM (14 years ago)
I have to close mapController.setZoom(15) with a ; ya?
 
jedijaded
I hate code!
Profile
Posts: 12
Reg: Mar 12, 2011
La Crosse, WI
120
like
03/30/11 08:23 AM (14 years ago)
so mapController.setZoom(15);
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 08:55 AM (14 years ago)
Yup. The semi-colon should follow like you have.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.