javascript - Animate zoom to google map location on click(custom google maps controls) - Stack Overflow

I want to have google map displaying whole planet(zoomed out maximally). Then, I would like to put over

I want to have google map displaying whole planet(zoomed out maximally). Then, I would like to put overlay over map with button. When user click on button the overlay is removed and google map is automatically animating to the location i want.

So, I am not asking for plete solution, I just want you to tell me if it's possible to do that using google map js api, and if you can give me some direction, that would be awesome. I have searched a lot but found nothing on this subject.

Thanks.

I want to have google map displaying whole planet(zoomed out maximally). Then, I would like to put overlay over map with button. When user click on button the overlay is removed and google map is automatically animating to the location i want.

So, I am not asking for plete solution, I just want you to tell me if it's possible to do that using google map js api, and if you can give me some direction, that would be awesome. I have searched a lot but found nothing on this subject.

Thanks.

Share Improve this question edited Mar 2, 2016 at 21:36 MWiesner 9,07812 gold badges39 silver badges72 bronze badges asked Mar 2, 2016 at 21:26 Nikola MiticNikola Mitic 1,4923 gold badges13 silver badges27 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 2

I've noticed, that if difference between current zoom level and new zoom level more that 2, google maps won't make smooth zooming.

You can take a look at same question: How to zoom in smoothly on a marker in Google Maps?

map.setCenter(new google.maps.LatLng(theLatitude, theLongitude));
map.setZoom(yourZoomLevel);

See also: change location to preset coordinates and zoom with click of a button

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745440470a4627808.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信