Over a million developers have joined DZone.

How to Add Zoom Controls to Android MapView

DZone's Guide to

How to Add Zoom Controls to Android MapView

The following code snippet shows how to add zoom controls to Android MapView.

· Mobile Zone
Free Resource

Get gorgeous, multi-touch charts for your iOS application with just a few lines of code.

Want to add zoom controls to Android MapView? We can achieve this by calling setBuiltInZoomControls(boolean) method.

MapView map = (MapView)findViewById(R.id.mapview);

The above code snippet will add the zoom controls to the bottom-center of theMapView. The zoom controls only show up when you touch the screen, so you have to make sure that the map is clickable.

       android:apiKey="your key">

.Net developers: use Highcharts, the industry's leading interactive charting library, without writing a single line of JavaScript.

android ,mobile ,iot ,mapview

Published at DZone with permission of Nilanchala Panigrahy, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}