How To Add Basic Grids To Googlemap Api V2
I would like to add the basic grids to my GoogleMap that use to be on maps. I read the docs but didnt found anything that could help, maybe the TileOverlay or GroundOverlay can do
Solution 1:
Seems like I have a code that does exactly that. I used it only for debugging, but here it is: DebugHelper.java.
Some notes:
- you will also have to copy SphericalMercator.java
- change
IGoogleMap
to originalGoogleMap
andIProjection
toProjection
clusterSize
parameter is in degrees, so you will have to change it depending on the zoom- finally: call
drawDebugGrid
inonCameraChange
.
If you want to see it in action, you may run the demo of Android Maps Extensions. The only change you need to make to see grid is setting DEBUG_GRID to true on one of the first lines in GridClusteringStrategy.java.
Post a Comment for "How To Add Basic Grids To Googlemap Api V2"