google-maps-android-api-2

Empty InfoWindow when Marker is clicked

試著忘記壹切 提交于 2019-11-28 00:08:27
问题 This is my code to add new Markers to my GoogleMap: MarkerOptions m = new MarkerOptions(); m.title(title); m.snippet(snippet); m.position(location); mMap.addMarker(m); mMap.setOnInfoWindowClickListener(new OnInfoWindowClickListener() { @Override public void onInfoWindowClick(Marker marker) { Toast.makeText(DemoActivity.this, "WindowClicked: "+ marker.getTitle() + ":" + marker.getSnippet(), Toast.LENGTH_SHORT).show(); } }); Now This works just fine when my title and snippet are in English. The

Android: Google Maps not displaying

三世轮回 提交于 2019-11-27 23:50:55
问题 I'm trying to get a google map to display. I can see the background (light gray background, small tiles, Google logo in the lower left), so I know that I'm close. However, there is no actual map displayed. In the LogCat, I see this message repeating over and over: 05-14 13:28:17.926: W/System.err(27458): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702) I'm using Google maps api 2 with a tethered

Highlight whole countries in Google Maps for Android

随声附和 提交于 2019-11-27 23:22:08
Referring to: Highlight whole countries in Google Maps I'm trying to return the location of selected countrys by the user in the Google Maps Android application. Something like this but in Android google maps. Is there a possibility to do this in android? Is it possible to do this offline? xomena The question about country or other features borders in Google Maps APIs was asked many times, however, unfortunately Google doesn't expose this data publicly. To highlight the country you should apply your own data as the Google Maps layer. Nice work around was proposed in the following answer https:

Android MapView getMap() returns null

為{幸葍}努か 提交于 2019-11-27 23:15:21
问题 MapView 's getMap() method can return null. I know this is an intended behavior by Google. Can someone provide a definitive description as to when and under which circumstances the getMap() method returns null? I know that if Google Services are unavailable on the given device, getMap() will return null. This eventuality is relatively well documented. I'm more concerned with the vague other case where even when Google Services are installed on a device, getMap() can still return null. My

Android - Google Maps API v2 - NoClassDefFoundError

我只是一个虾纸丫 提交于 2019-11-27 23:13:47
问题 I try to run Google Maps with Intellij IDEA 12. I already tried advices: Embedding google maps android v2 in android Google Maps Android API v2 Authorization failure Unable instantiate android.gms.maps.MapFragment Google Maps Android API gives a NoClassDefFoundError and so on. But unfortunately that doesn't work for me. My configuration: 1) real device htc wildefire s, android 2.3.5 2) 3) AndroidManifest.xml : <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ru

Google Maps Android API v2 SupportMapFragment memory leak

雨燕双飞 提交于 2019-11-27 23:13:20
问题 Using 2 simple activities. First Activity which only holds a button to start the 2nd Activity which holds the map: Main Activity: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void goToMap(View view){ //This is just the onClick method for the button Intent intent=new Intent( this, BigMapTest.class); startActivity(intent); } The map activity: public

Google Maps not loading after publishing on play store even after updating SHA 1 fingerprint for release key

冷暖自知 提交于 2019-11-27 20:50:59
A newbie here to google maps api and android app development. I am facing some strange issue and struggling with this from two days. I have developed an app in which I have used Google maps. I have launched the app to play store. The google map loads perfectly fine when I install the signed apk directly to mobile but not when I install through play store. I have updated google maps api console with release key SHA 1 fingerprint. I am not able to find any solutions online also and did not get any support from google support team also. Somebody please help! Chandan Suri If u have enabled the App

Multiple line or break line in .snippet (google maps apiv2)

ぃ、小莉子 提交于 2019-11-27 20:48:56
I'm developing in google maps APIv2. The issue that I'm facing now is I only able to add in one line of word in info windows/snippet. But the output that I want is able to display in break line form as example show below. So is there any possible methods to solve it? Example: Coordinate: 03.05085, 101.70506 Speed Limit: 80 km/h public class MainActivity extends FragmentActivity { static final LatLng SgBesi = new LatLng(03.05085, 101.76022); static final LatLng JB = new LatLng(1.48322, 103.69065); private GoogleMap map; @Override protected void onCreate(Bundle savedInstanceState) { super

Add markers dynamically on Google Maps v2 for Android

别说谁变了你拦得住时间么 提交于 2019-11-27 20:20:11
what are the possibilities to add markers dynamically depending on the area of the map which is shown? I have a lot of markers or let´s say my markers need a lot of performance to be rendered, cause they are custom. I implemented it now, that only 40 markers are drawn when a "camerachange" was fired. So at this time i always render 40 new markers when cameraposition was changed. I read about runnable and handler, are their more options? Does someone know which of these possibilities is the best, so that ui-thread isn´t blocked? I would suggest using one of clustering libraries available for

Using the android Google Maps API v2 as a viewer of offline tiles: is it possible?

懵懂的女人 提交于 2019-11-27 20:15:46
The Google map component (com.google.android.gms.maps.GoogleMap) allows one to render custom tiles (OpenStreetMap or other). These tiles can be on the device and available offline which is what I am doing by extending TileProvider. Doing this in conjunction with a: mMap.setMapType(GoogleMap.MAP_TYPE_NONE); I am not pulling any data from Google map servers and the component can reasonably be expected to work without an internet connection. (I emphasize here that I am not trying to cache Google's data ; I am working with offline tiles independently of Google's map servers.) I thought everything