Show map in image view - android

I have made an app which shows the user current location using the OpenStreetMap. I used the osmdroid library. Now I want to show this map in an image view in another app. Any ideas on how could I achieve this?
Thanks.

If your get map as Image, You have to follow some steps
You have to create project on Google Developer Console
Activate your API keys in your library dashboard on developer console.
Use this URL for Activate static map page API:
https://console.developers.google.com/apis/api/static_maps_backend/overview?project=YOUR_PROJECT_NAME
If you need to get map us static image and without any marker then call this following web link
https://maps.googleapis.com/maps/api/staticmap?maptype=roadmap&center=12.990912,%2080.218304&zoom=17&size=640x400&key=YOUR_API_KEY
This link is given output like this
If you need to get map us static image and with some marker then use this link
This link is given output like this
If you need more than 2 markers then you have to append more marker information and lat, long
Hope this will help you...
If need more information visit here
https://developers.google.com/maps/documentation/static-maps/intro
https://developers.google.com/maps/documentation/static-maps/styling

Find the solution
This URL gives the map image based on latitude and longitude values
https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap
&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318
&markers=color:red%7Clabel:C%7C40.718217,-73.998284
&key=YOUR_API_KEY
For more details find the url : https://developers.google.com/maps/documentation/static-maps/intro

Related

load map only single city on google map android

I want to show map only one city or country in my android app. How can I do it ?
I do not need to load map of all world
image 1
image 2
if you want to see only country or city you can use its latlng bound its focus on the particular city or country when user come first time here all country latlng bound https://gist.github.com/graydon/11198540
First, you have to be familiar with Google Map API (create an API key, import it to your project, etc.)
Then, get the LatLng of the city you want, and on the moveCamera method, pass to it a good zooming (it's a float). For exemple, when your widget is beeing launched, call something like : mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(yourCoords, 10f))
If you don't want / need to allow any user interaction with your map, just set the parameter "liteMode" to true inside your XML (or programatically), it will generate a bitmap of your desired location.
Bye.

How to show marker on that lat/long when appending lat/long in Here We Go Url and How can i get Phone number from place api

I used Reverse Geocoding in my code using TRACK_POSITION where i need to pass
bearing .
ResultListener<Location> listener = new ReverseGeocodeListener();
ReverseGeocodeRequest2 request = new ReverseGeocodeRequest2(geoCoord, null, RETRIEVE_ADDRESSES, bearing);
if (request.execute(listener) != ErrorCode.NONE)
{
// Handle request error ...
}
It takes float value and i am confused what should be the value of bearing. i hardcoded some vale which still gives me response and i am getting street name as result/ response of ReverseGeocoding with lat/long/alt, now here comes the problem i want to get the link of Here We Go website of the particular lat/long.
Case 1: (What i was trying to do)
So i Stored a string value of Here We Go url and i wanted to append lat/long to the url i was successful to do so but the link i am getting is showing me just the area not the marker on the lat/long. how can i achieve the marker on that lat/long.
Case 2: Is there anything we can do programatically to enter lat/long inside the search textbox of Here We Go(this thing shows marker on the position) and get the url of that search and store it in the string ?
I am also using Place Api for getting nearby place depending on categories, but i am not getting phone number value in response with other values.As i search for it on the developer website it says we need special access but i have Here Premium SDK so can you guys help with this i tried contacting Here but no response.
Any help would be Appreciated. Thanks in Advance.
We hope both case 1 & 2 of your question drills down to how to append the search term (in your case lat,long) to the here we go map to get a marker on the map. If this is right, then all you need is to call the here url with the search lat,long like this: wego.here.com/search/51.52395,-0.15818

android Map image

I am developping a weather android application which displays the temperature of each city of a given country on a Map. So, I would like to use "Map image" but I have not clear idea: how I can locate the cities of this country on this "Map image", generate an event when a click on a city ...
Can someone help me please? Thanks
Use Google Map to achieve it. follow this. Its clearly explained.

Info associated to current view in Google Map Android

Does anybody know a way to get a list of information associated to the current view used in Google Map in Android? Let's say that I wanna know all the pharmacies present in the current view... is there a way to retrieve this list from the current view?
Like:
pharmacy 1 : name / location on map
pharmacy 2 : name / location on map
etc.
Yea, you need to use the google places api to get information like this.

How to get the location of a place on google map

i'm developing an android application similar to Google places app.
I want a functionality to obtain the location of a place on google maps in my application. How do i achieve this?
This is the use case:
Using GPS my current location's lat and long will be passed using the notification service.
Then when i click on the button restaurant,the list of restaurants in that particular location will be displayed(all information is being retrieved from the server that i created using grails).
Then i select a restaurant's name from the list being displayed.and then in the user interface there is a button called "MAP" .
Upon click of the "MAP" button, the location of the restaurant i have chosen must be displayed on Google maps.
What's the thing that you can't do - displaying the restaurant on the map, or having just the name of the place, you wish to find it's address/coordinates on the map?
You can follow the official Android tutorial on the subject - Point 2 in this article: http://developer.android.com/resources/tutorials/views/… Probably this article will be useful as well: http://mobiforge.com/developing/story/using-google-maps-android
Part 1 and 2 guide you through the creation of a Map activity (you should start a new map activity when the user taps on MAP button) and how to add an overlay to the map. In the article the overlay is the android robot. The other articles uses a pushpin as an overlay. Overlay, on the other hand, is .. a picture that is displayed on the map. In your case - some pinpoint put on the coordinates of the restaurant. Once you've created the map activity, you can follow my second link and look for title "Adding Markers". It's very well explained.

Categories

Resources