Android maps setZoom(19) - android

I have one marker displayed and centered in my ItemizedOverlay in maps, currently I call setZoom(19).
But how can I control the zoom level? i.e. I want to zoom in as detailed as possible, but still showing the map in satellite mode clear.
I have noticed that if you zoom in to far everything just goes black. How can I zoom into the most detailed level without going to far?
Any help most appreciated...

Just use
setZoom(mapview.getMaxZoomLevel());
https://developers.google.com/maps/documentation/android/reference/com/google/android/maps/MapView

the solution is: look at the UiSettings in api v2 reference, there is the "setMaxZoomLevel" and "setMinZoomLevel".
Setup the max zoom level to the one that doesn't show a black screen (make some tests), then call the setZoom(mapview.getMaxZoomLevel());
Regards.

Related

Android Studio Google Maps Clustering

I have 30 000 Markers inside my map and i tried Cluestering them like Google,up to here all good.
The problem is when i zoom a specific area the markers unclustered not only inside that area but in all the maps and when i unzoom all markers render on my map slowing down
i also have the same problem, showing 32k markers. they said to decide a zoom value where clustering is disabled in the Renderer shouldRenderCluster something overridden method. but i still think the clustering has limitations. i dont mind if max zoom doesnt decluster the markers. the important thing is that when they get clustered, it shouldnt happen like what you showed above.

Arrow direction header pointer in google map marker for Android

I am using Google map v2,everything works fine from viewing the map to applying polyline between markers.However there is one thing that I need to accomplish, it is to put arrow header inside the commonly used map marker.
The arrow must rotate or point to the direction of the next location and so on. here's the image looks like
map_marker
I have tried using only the arrow alone and it works fine with the use of .rotation(bearing) but my boss wants it inside the commonly used marker and only the arrow will move.They have a working sample but it works only in the browser using javascript.I haven't found samples or at least documentation about it on the internet only this similar question
How to display direction arrows in the map marker for google maps v2 android but unfortunately no one answered. I have also tried
.icon(BitmapDescriptorFactory.fromBitmap(getMarkerBitmapFromView(R.drawable.arrow_header)))
but the both the marker and arrow moves
I have done everything to accomplish this task and this would be my last resort just to inform my boss that just in case there is no way that it'll work on android. Thank you..

How to clear coordinate where i want on google maps API v2

I made polygon on maps fill black and tried to clear current location use addHole method.
But if holes overlap each other, polygon with holes appear i don't want!
Please give me answer...
http://i.stack.imgur.com/jn15M.jpg
http://i.stack.imgur.com/RajLA.jpg
Plus, Is there exist a way clear the polygon given gps coordinate??
Thanks
You can use TileOverlay.remove() method to remove a tile overlay or use tileOverlay.clearTileCache(); to force a refresh. This will cause all the tiles on this overlay to be reloaded. If the tiles provided by the TileProvider change, you must call clearTileCache() afterwards to ensure that the previous tiles are no longer rendered.

Android google map path disappear during zoom

I have a problem with drawing on my custom overlay when I zoom Google map to specific level.
I made my itemized overlay provided default marker, and aver wrote a draw method with path connecting overlay items. Next I added overlay items with Geo coordinates. WhenI run my application it works perfect showing all items with default marker and a line connecting those items. Then I zoom in/out and everything still fine but when I zoom very close my line disappears but markers still visible. If I zoom out line appears back to normal.
Dis problem exist only on actual devices, never on simulator.
Any ideas what it could be?
Thanks
The same happened to me on my Nexus 7. I solved the issue by changing android:targetSdkVersion="14" to android:targetSdkVersion="8" in AndroidManifest.
Update: You can use google maps api v2 (MapFragments)
Are you sure that both points (start and end point) of the line being drawn are visible in the screen after you zoom?
I've realized that on my device that when zooming, if the starting and ending coordinates for a rectangle are out of the screen, the rectangle will not be drwan, even if the center should be visible.
Regards.

Android-Adjusting the zoom controls

In my google maps activity,the map is shown based on the current position.So i need to adjust the zoom controls of the map so that my current point and target point is always visible in the map.I think i need to be more specific.ie,I have a target address that is shown by an overlay image.My current position is focused on the map.So as I move away from the target,I need to adjust the zoom controls so that the target is still visible.Similarly,When I move close to target,I need to zoom in.
Check this answer here they have given code to zoom to the level to show each Overlay Marker drawn on the map so each of them are visible..may be this can solve your problem
LINK TO THE QUESTION
Use the following methods of MapView:
mapView.getController().setZoom(13); // set the zoom level here
mapView.getController().setCenter(point);
where mapview is the instance of MapView.
Hope this is what you want.

Categories

Resources