I need to get address from lon lat location. I was trying with geodecoder but it doesn't work (throws Service Not Available). Is there any other solution to that problem?
The geocoder is not guaranteed to exist on all devices. Couple of things to try:
The documentation is not exactly clear, but it seems that if you have the Google add-ons, you should have a geocoder backend implementation. Try linking against the Google APIs for your target API level (see below)
https://stackoverflow.com/a/2255592/483708
In your implementation, prevent erroneous results by explicitly checking for geocoding functionality with Geocoder.isPresent()
http://developer.android.com/reference/android/location/Geocoder.html#isPresent()
If the above points are insufficient, you will need to use the Google Maps Web APIs to perform reverse geocoding via the web:
http://code.google.com/apis/maps/documentation/geocoding/index.html#ReverseGeocoding
Also take a look at the GeoCoderPlus library referenced in this blog post
http://bricolsoftconsulting.com/perfect-geocoding-zoom-part-1/
It uses Google Maps Web APIs, but for 'forward' geocoding. You may be able to use the blog post and the included code as guidance to build your own implementation of reverse geocoding via the web.
It seems to be a bug in the emulator running SDK 2.2. I have had the same problem.
Create a 2.1 or 2.3 emulator and try your code.
Related
I'm using the google places SDk which I'm aware has deprecated. I'm using the AutoComplete functionality but constantly get errors that state there is a network error and the resolution is null. Is this because of the deprecation? Does it make a difference if my API Key is in my Manifest or can I store it anywhere I want (Ignore security purposes)?
You cannot use the deprecated Places SDK anymore. You'll need to migrate to the new Places SDK for Android if you want to continue using the Places service; there's no way you can get the deprecated SDK to work by this time.
Check out What are the consequences of not migrating to the new released google places sdk
Note that you'll also need to migrate to AndroidX if you haven't done so yet either.
Hope this helps!
My goal is to have a GPS Track displayed in a local Java Application with Google Maps. And I am pretty sure I am not the first one to try this, so there should be a way.
The Problem is that I found the Google Maps Engine API (Deprecated) which is stated as deprecated. But I didn't find any replacement. Only this page, which then links to the deprecated version again.
I also did some search, but all results seem to point to future deprecated API, and also are pretty old.
Can anyone point me a version or tooling that I will be able to still use in 2016? Or does anyone know an alternative to using Google Maps for displaying GPS tracks in a local java app.
Thanks
In case anyone has the same problem:
I used mapsforge https://github.com/mapsforge/mapsforge
JxMaps library provides possibility to add Google Maps to java swing application. Using this library you can draw GPS track either as polyline or set of markers on the map.
Background:
I've inherited someone else's problem and am trying to get an app up and running. Multiple developers have ditched the project and now its my turn. I'm an iOS developer by trade but I have a few simple android project completed.
The problem app is a native android originally built with API level 7 and is heavily built around google maps api version 1. I don't have access to the original keys so I appear to be forced into upgrading to google maps version 2.
I have already set up a new Activity and am beyond the basic tutorials of getting a functioning map. No problems there, but I'm blocked on items like GeoPoint and don't seem to be able to find much information on its replacement.
My question is this:
Is there a migration path to move from API version 1 to API version 2 or do I have to re-code the whole map component? GeoPoints, custom pins, and overlays included?
The sad answer is that most of the objects of Google Map API V1 are replaced with new Objects in Google Map API V2.
For example instead of using GeoPoints you are going to use Latlng points. Overlays are gone as well and replaced with Polylines and Polygones.
Take a look at this answer I gave here:
Convert Android App that uses maps API V1 to Maps Android API V2
And have a look at this blog post I wrote that will get you started with Google Map API V2 implementation in your app:
Google Map API V2
So as you can understand most of the code should be rewritten to fit Google Map API V2.
I have done some Google research off and on for a week or so on the subject, And I have not found anything conclusive. I am just wondering if it is possible to use the geocoding found in android on a regular java project?
I have been looking and all the geocoding i have seen for regular java seems to have some restrictions on its use, and I do not remember reading anything of the sort with the android geocoder so I am trying to use this instead of others. However if anyone does have some good suggests for a geocoder for a java program please let me know.
thanks,
bob
P.S I would rather not use the google api because it only wants it to be displayed on a map which I am not doing. I am trying to store them in a database. And the other google option has a daily limit on the amount of calls to there api so again as mentioned this is a restriction.
as mentioned on the google api page it states "Note: the Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions."
So this is not a option for me.
you can always use Google's geocoding API based on HTTP requests.
https://developers.google.com/maps/documentation/geocoding/
hi i want to use googlemaps 5.0 (3D view(Street view) )in my android app .is it possible .please share some resources or tutorial that how to use them
Have you already checked out googles official documentation?
http://code.google.com/android/add-ons/google-apis/maps-overview.html
No, it is not possible. The Google Maps app and the maps add-on for app development are separate. The only thing you can do is open Google Maps to a given location via the geo or google.streetview URI schemes.