android-maps-v2

Android Google Map API V2 : Open Custom Info Window on Right Side of Marker

耗尽温柔 提交于 2019-12-02 17:58:45
I have Integrated Google MAP API V2 for Android. I want to have a Custom Info Window at Onclick of My Marker. Up to that it is fine. i have integrate it. What I want : I want to Show my Custom Info Window on Right Side of Marker Instead of Top of the Marker. Below is the Code I am Using : public class MainActivity extends FragmentActivity { private MainMapFragement mapFragment; private HashMap<Marker, EventInfo> eventMarkerMap; Marker ThirdMarker; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);

GoogleMap won't load detailed map until user interaction

旧街凉风 提交于 2019-12-02 16:48:33
问题 I'm writing an application on android that will show a map from google maps. When I start the app, the map is centered on the current location. When I use animateCamera , I can see the zoom-in animation from the whole world until it focuses on current location. The problem is that I need to touch the map to get the map to display at the zoom level I expected. Here is what I get before I touch the screen : Before touch Here is what I get after having touch the screen : After touch If I touch

How to add basic grids to GoogleMap Api v2

怎甘沉沦 提交于 2019-12-02 13:05:54
问题 I would like to add the basic grids to my GoogleMap that use to be on maps. I read the docs but didnt found anything that could help, maybe the TileOverlay or GroundOverlay can do the trick, but i didnt found any examples or tutorials, not even in the official samples. Can anybody suggest me some ways that could work ? E D I T : Yes i would like gridlines like this: 回答1: Seems like I have a code that does exactly that. I used it only for debugging, but here it is: DebugHelper.java. Some notes

GoogleMap won't load detailed map until user interaction

纵饮孤独 提交于 2019-12-02 07:49:59
I'm writing an application on android that will show a map from google maps. When I start the app, the map is centered on the current location. When I use animateCamera , I can see the zoom-in animation from the whole world until it focuses on current location. The problem is that I need to touch the map to get the map to display at the zoom level I expected. Here is what I get before I touch the screen : Before touch Here is what I get after having touch the screen : After touch If I touch the screen, the image will remain fine, until I drive a few hundred meters and then it's again unuseable

Google Map Lite Mode moveCamera to lat lng bounds adds unwanted map padding

徘徊边缘 提交于 2019-12-02 06:15:44
问题 I want map camera to move to my LatLngBounds. So I add map fragment to layout in BaseExpandableListAdapter 's getChildView and onMapReady I'll moveCamera to LatLngBounds @Override public View getChildView(final int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { convertView = inflater.inflate(R.layout.event_child, parent, false); GoogleMapOptions options = new GoogleMapOptions(); options.liteMode(true) .compassEnabled(false) .mapToolbarEnabled

getting Failed to load map. Error contacting Google servers

依然范特西╮ 提交于 2019-12-02 03:54:48
问题 I read all the post concering this issue and yet I wasnt able to solve it on my mechine. I allways get: 06-23 20:04:30.011: E/Google Maps Android API(6623): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors). when getting to the map activity. my code: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mobwal" android:versionCode="1" android

Placing SupportMapFragment on DialogFragment

落花浮王杯 提交于 2019-12-02 01:17:19
I'm trying to add SupportMapFragment on DialogFragment, but it return error inflating class fragment . I cannot figure it out why its returned error inflating class fragment . I think the method I use is correct. I need to extends from DialogFragment because i want show map in dialog. I have followed this answer , and this answer too, and no one can solve my problem. Somebody could help me? Thanks. Here is my DialogFragment : import android.support.v4.app.DialogFragment; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.view.LayoutInflater; /*

Check LatLngBounds.Builder if null

痴心易碎 提交于 2019-12-01 20:58:32
This is mycode: LatLngBounds.Builder builder = new LatLngBounds.Builder(); for(int x = firstVisibleItem; x < lastVisibleItem; x++){ builder.include(temp.getPosition()); } However this line throws an error ( java.lang.IllegalStateException: no included points : double north = builder.build().northeast.latitude; This is because the above loop didn't run at all so no points were included in the builder . How can I check if the builder has at least one point? I tried builder.build()!=null which throws the above error and builder!=null which is always True. try{}catch(IllegalStateException e){ }

SecurityException when calling getLastKnownLocation

自古美人都是妖i 提交于 2019-12-01 16:57:56
We've been getting reports of crashes on some devices when a user opens an Activity that calls the location manager's getLastKnownLocation method. We've requested all the required permissions in our application manifest: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> Here is the stack trace: java.lang.RuntimeException: Unable to resume activity {com.projectname/com.projectname.ui.AtmFinderActivity}: java.lang.SecurityException: invalid package name: com.google.android.gms at android.app

Google Maps Android API v2: Failed to Load Map. Could not contact Google Servers

和自甴很熟 提交于 2019-12-01 16:39:02
I'm trying to use Google Maps Android API v2, and I have already created the SHA1 key from my release cert. I've read the comments from here and have made everything right, including the permissions for READ_GSERVICES which wasn't stated in Google's instructions here However I'm still having the error of E/Google Maps Android API(12334): Failed to load map. Could not contact Google servers. Can anyhow enlighten me if I still have something left out? I've included this as well: <permission android:name="com.example.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission