Android: how to zoom to a specific square in Skobbler maps - android

I need to display a polyline and want to center the map on this polyline. How to zoom to a specific square consisting of two latitudes and two longitudes in Skobbler maps?

Create an SKBoundingBox from the 2 coordinates and then "fit" the visible screen to that bounding box via fitBoundingBox

Related

Highlight all the worlds in Android Google Maps

I'm developing an app in which the user can select points on a Google Maps and create areas based on point-radius and display them on the map with a semi-transparent circle of a specific color. The user is also able to insert "all world" areas. I need to display this "all-world" area on the map, is it possible to add a semi-transparent polygon that cover all the map? Or, is there a better solution to highlight all the map?
Check the documentation of Polygons under the Shapes in Google Maps Android API to cover the map.
Polygon objects are similar to Polyline objects in that they consist of a series of coordinates in an ordered sequence. However, instead of being open-ended, polygons are designed to define regions within a closed loop with the interior filled in.
To create Polygon, first create a PolygonOptions object and add some points to it. These points will form the outline of the polygon. You then add the polygon to the map by calling GoogleMap.addPolygon(PolygonOptions) which will return a Polygon object.
To alter the shape of this polygon, just call the Polygon.setPoints() and provide a new list of points for the outline of the polygon.
Now, for customizing the appearance of the polygon, just check this link. And for the semi-transparent polygon that you want, you can check these tutorial and SO question on how to achieve that.

Google Maps with custom map in Android

Is there a way to display a custom map using the Google Maps API and draw polylines on it using (x, y) coordinates? I am not interested in geolocation, since I just want to create a demo scenario for an indoor navigation app.
Depending on your needs you can use Tile Overlays that allows you to load your own map using the tile engine of the map or Ground Overlays that draws a fixed image on a given coordinate.
As both are map overlays you can still draw polylines, polygons, markers, ... on the map

How to show distance based on particular range on osm map in android

I want to show circle using osmdroid(offline map) which displays particular latitude and longitude in fix range(10 km). I have put the circle using canvas but when i zoom in and zoom out at that time the circle does not resize accordingly. Please suggest me solution for this.

Android calculate bounding box for mapview

I am not using Google maps or Openstreet maps. I am using another third party custom maps which do not provide any bounding box classes or methods. So What i want to achieve is to zoom to fit all markers on the map or zoom to route drawn on map. Like Google provide LatLngBounds bounds = mMap.getProjection().getVisibleRegion().latLngBounds; classes and OpenStreetMaps provides zoomToBoundingBox() to achieve this functionality. I only have latlng points and map dimensions width/height. How can i calculate bounds or bounding box zoom level for markers or route drawn on map to fit it to screen? Any formula or mathematical calculations?

Adding markers to google map 2 depending on the zoom level

I have multiple markers set around on the map. What I want to know is how can I show only a few markers depending on the zoom level. For example: I have a zoom on the map with radius: the length between the center of the map and the bounds of the screen (lets say this is like 2km in real life not sure if this is true) so I want to show only the markers that are inside the radius. And of course if the user zooms out the radius will be recalculated again from the center point of the map to the bound of the screen. And again include markers that are inside the new radius. How can I achieve this?
I have thought about this problem and here could be an approach.
you can loop through your available markers and find distance from the center of your given circle (since we're talking about a radius) to the marker; this can be done using computeDistanceBetween(); for more info see link
If the marker lies within your radius, show, otherwise, hide using the setVisible() method. For more information, see link
Hope this gives you some idea.

Categories

Resources