google-maps-api-2

Cluster Marker not hiding when zoom in

你说的曾经没有我的故事 提交于 2019-12-07 08:23:55
问题 I'm trying to implement a cluster marker on my map, and it is behaving a little strange, first, it shows me the cluster marker but also shows me the point markers, that shouldn't be happening, and when I zoom in the cluster marker still showing, i'll add some images to explain it better. public class MapaViagem extends FragmentActivity { private GoogleMap googleMap; private String rm_IdViagem; private List<ClienteModel> mClienteModel = new ArrayList<ClienteModel>(); private List<EnderecoModel

Google maps API: Marker image positioning

我与影子孤独终老i 提交于 2019-12-06 19:54:47
问题 I have changed the image that I use for a marker on Google maps. The new image is much wider than the old one and I have noticed that the marker is aligned with the lat and lng so that the marker rests with it's horizontal midpoint over the lat and lng . This is not what I want, I want to have the lat and lng aligned with the markers left hand side - I want to offset the marker from the default position by about 80px to the right. 回答1: Try this on for size. var markerImage = new google.maps

Google Maps API on android not working

让人想犯罪 __ 提交于 2019-12-06 15:44:41
I am trying to add a map to my android application. But I am getting the error posted below. I have installed the google play services, and have also added the required dependency for my app to support map. I have added the required api key to the manifest, added the following line after the application tag uses-library android:required="true" android:name="com.google.android.gms" (the following in an element of the application tag and not an attribute) An idea what I am doing wrong? 03-12 15:31:11.457: E/AndroidRuntime(12833): FATAL EXCEPTION: main 03-12 15:31:11.457: E/AndroidRuntime(12833):

Overlay an image on google maps android api v2

99封情书 提交于 2019-12-06 11:53:40
I am trying to use GroundOverlay to add an image to my map. I'm working with the example from https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/GroundOverlay which is given like this GoogleMap map = ...; // get a map. BitmapDescriptor image = ...; // get an image. LatLngBounds bounds = ...; // get a bounds // Adds a ground overlay with 50% transparency. GroundOverlay groundOverlay = map.addGroundOverlay(new GroundOverlayOptions() .image(image) .positionFromBounds(bounds) .transparency(0.5)); However I don't know how to get the image as a

This app won't run unless you update Google Play Services

故事扮演 提交于 2019-12-06 07:38:06
问题 I've been trying constantly now to get google maps for android V2 to work. I'm trying this on device : Samsung Galaxy S [2.3.3] and on emulators. My manifest: (I've tried using both Debug key and Release key) <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.klottr" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18" /> <permission android:name="com

Rotating drawable via XML not working with marker on GoogleMap V2

我怕爱的太早我们不能终老 提交于 2019-12-06 07:10:09
I would like to rotate a drawable with an xml-file , then show it on the map. I do like this. //...// mo1.position(myLatLng).icon(BitmapDescriptorFactory.fromResource(R.drawable.myxmldrawable)); map.addMarker(mo1); //...// XML file: <?xml version="1.0" encoding="utf-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromDegrees="180" android:toDegrees="180" android:pivotX="50%" android:pivotY="50%" android:drawable="@drawable/pin"/> If i ran the code the following exception caught: 07-16 13:10:18.347: W/System.err(26084): java.lang.NullPointerException 07-16 13:10

Adding Multiple Markers on Google Map using api v2

[亡魂溺海] 提交于 2019-12-06 03:32:07
问题 I have got a database with latitude and longitude values in it. I can show only one marker at a time. I would like to show multiple markers at the same time. How can I do it? 回答1: Here's a very basic example: <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Google Maps Multiple Markers</title> <script src="http://maps.google.com/maps?file=api&v=2&amp" type="text/javascript"></script> </head> <body> <div id="map" style="width: 500px;

“Unfortunately Google Play Services has stopped” but map works fine

孤者浪人 提交于 2019-12-06 02:52:28
I followed steps in the developers guide in programming google maps. My API keys are fine. I also installed apks so that i can run the map application to the emulator. As i run my android emulator, an error "Unfortunately Google Play Services has stopped" pops up. But the thing is the map works fine after you just click OK. I just copied all the codes from the beginners guide provided so no need to copy my code here. Anyone knows the problem? thanks UPDATE I think I've found a possible solution: instead of using the Google Play Services apk from my rooted device, I used the apks included in

How to get markers inside an area selected by mouse drag?

核能气质少年 提交于 2019-12-06 02:51:16
问题 In Brief I want to find all the markers which lie within a rectangular area created by dragging the mouse over the map. Is this feature supported by any jQuery plugins or something else? If not, I would like to implement this in my project. I think it would be cool. Details I am using Google Maps v2 because I want to support IE 6 in my project. I am a beginner in Maps and went through the Developer's guide section and some basic demos and other SO questions. Here is my idea so far - User

Google Maps Android API v2 - simple map app crashes

独自空忆成欢 提交于 2019-12-06 00:06:31
I'm new to android dev :) I'm trying to create a simple app: an activity with a map. I connected my HTC 1x to the computer and when I try to run the app (via intellij IDEA), it crashes. I have searched for the net (and stackoverflow) for clues and couldn't find any. For example: - Google Maps v2 - Error - google map - runtimeexception - error inflating class fragment Can you please tell me why?? Thanks, Omer Tech details: HTC 1x runs android 4.1.1 Project External libraries: - Android 4.0 Google API's - Android-Support-V4.jar - google-play-services.jar Main Activity.xml: <?xml version="1.0"