google-maps-api-2

getSupportFragmentManager returns null

我怕爱的太早我们不能终老 提交于 2019-11-30 09:45:40
问题 I'd like to show Google maps in my android app: public class DisplayMapActivity extends ActionBarActivity { private LbsTracker2 lbsTracker2; private GoogleMap googleMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); try { this.initilizeMap(); } catch (Exception e) { e.printStackTrace(); } } @Override protected void onResume() { super.onResume(); initilizeMap(); } private void initilizeMap() { if

How can I include the traffic layer of google maps?

。_饼干妹妹 提交于 2019-11-30 08:22:05
I'm new to development within android using the Google Maps API. I've been able to set up a map and test out the basic functionality, but I'm having trouble implementing the logic shown in the documentation into my own code. I've researched and found through google's documentation you must have the map check if traffic data is available by using: public final boolean isTrafficEnabled() and then calling the method: public final boolean isTrafficEnabled() { return mMap.isTrafficEnabled(); } public final void setTrafficEnabled(boolean enabled) { mMap.setTrafficEnabled(enabled); } I'm not exactly

Add numbering label to google map marker

只愿长相守 提交于 2019-11-30 07:45:02
May I know how to add numbering label to google map marker using google map api? Just add label, not trying to change the icon. Thank you. If you don't want to use custom icons for each marker then I suggest looking into creating a label class with the OverlayView and then binding the position to the marker. Or you could look at using something like: http://github.com/nmccready/google-maps-utility-library-v3-infobox Alex Angelico I think a better solution is to use a infoWindow. Something like this: $(document).ready(function () { var golfoMexico = new google.maps.LatLng(20.61536,-87.078975);

mapview and cameraupdate in api v2

有些话、适合烂在心里 提交于 2019-11-30 07:07:20
问题 Why the CameraUpdateFactory class is not working in my project? The app crashes if it executes the following command: CameraUpdate pino= CameraUpdateFactory.newLatLng(new LatLng(location.getLatitude(), location.getLongitude())); If i remove that line (and of course the next one), the code successfully starts and shows the map. I need the mapView and i need to use the new api v2. I declare the mapView in layout in this way: <com.google.android.gms.maps.MapView xmlns:android="http://schemas

How do I use Google Maps geocoder.getLatLng() and store its result in a database?

隐身守侯 提交于 2019-11-30 03:06:40
问题 Hey everybody! Im trying to use getLatLng() to geocode a list of postal/zip codes and store the generated point in the database to be placed on a map later. This is what I've got so far: $(".geocodethis").click(function () { var geocoder = new GClientGeocoder(); var postalCode = $(this).siblings(".postal").val(); var id = $(this).siblings(".id").val(); geocoder.getLatLng(postalCode, function (point) { if (!point) { alert(postalCode + " not found"); } else { alert(point); var serializedPoint =

Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a

↘锁芯ラ 提交于 2019-11-29 22:29:33
Everything was working ok, then suddenly eclipse started breaking asking for a perspective switch and going to debug mode with the error 'Link of class "Lcom/google/android/gms/location/internal/ParcelableGeoFence;" failed. Googling the problem lead nowhere. Debugger points to PathClassLoader(BaseDexClassLoader).findClass(String) line: 61 Strangely when I remove map.setMyLocationEnabled(true); from my code it no longer crashes but still I can see this in logcat E/dalvikvm(5639): Could not find class 'gpr', referenced from method gps.a W/dalvikvm(5639): VFY: unable to resolve new-instance 4090

android Zoom-to-Fit All Markers on Google Map v2 [closed]

自古美人都是妖i 提交于 2019-11-29 19:24:48
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . How to zoom in/out the map view such a way that it cover all markers? i am reviewing sample code of gmap V2 given in sdk. It lays on sdk\extras\google\google_play_services\samples\maps. Thanks in advance. 回答1:

Google Maps v2 not loading. Error android.view.InflateException: Binary XML file line.. Error inflating class fragment

☆樱花仙子☆ 提交于 2019-11-29 17:57:33
This is my MainActivity. minimum sdk version is 11 in my app. I used the API key in the android manifest file. When I did some minor modifications, it is showing me blank white space instead of map. public class MainActivity extends Activity { // Google Map private GoogleMap googleMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); try { // Loading map initilizeMap(); } catch (Exception e) { e.printStackTrace(); } } /** * function to load map. If map is not created it will create it for you * */ private

Change GMSMapView default map background color in iOS

自闭症网瘾萝莉.ら 提交于 2019-11-29 17:13:38
The GMSMapView in iOS has a default background color of tan, or something like it. I have a requirement to change that color to white. I've tried using a subclass of GMSTileLayer without success (or errors). I need to place custom map overlays with white backgrounds onto the map view. In areas without the overlays, the base map color needs to match (white). Tried the following without any luck: [mapView setBackgroundColor:[UIColor whiteColor]]; Can anyone offer suggestions, or point me to a resource (other than Google) that might help? Thanks! Now you can change GMSMapStyle of you map

Google Maps API v2 shows blank map

半世苍凉 提交于 2019-11-29 15:00:28
I have set up an Android Application in order to view some things on a Google Map. I used the Google Maps API v2 and followed all the setup which can be found here . I even registered the application using a key that I applied for on Google's website. I have been able to get the Activity running but every time I open it I am greeted with a blank screen. This is my Manifest File <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.stullich.tim.woistmeinphoto" android:versionCode="1" android:versionName="1.0" > <uses-sdk android