google-maps-markers

Make marker draggable after single click in Android

那年仲夏 提交于 2020-01-14 08:01:06
问题 I am doing a little project on Android with Google maps. And I have one question - it is possible to make marker draggable with single click on it, not after long press. For example: I click marker, it changes icon and I can drag it anywhere in map, and then after another tap he will not be draggable again and changes its icon back? (Marker must be draggable all the time from first tap to second even if you release it) 回答1: @user2595870: Hello, I know it should be in comment but due to less

New Google API Key “Google Maps API v3” doesn't work for Google Places API?

人盡茶涼 提交于 2020-01-14 06:53:27
问题 I am working with the Google Places API (https://developers.google.com/places/documentation/search), and have generated a new Google API Key with 'Any IP Allowed'. When I try to get the results of the API service URLs below, I am getting a REQUEST DENIED error. https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&sensor=false&key=AIzaSyA3vtFM8AMlIO853ra82KzryBs752VIWts https://maps.googleapis.com/maps/api/place/search/xml?key

Move camera position to fit LatLngBounds with regard to marker height

会有一股神秘感。 提交于 2020-01-13 10:29:07
问题 I want to move camera to position to fit LatLngBounds with regard to marker height. So far I'm able for fit the anchors of markers with this code: LatLngBounds.Builder builder = new LatLngBounds.Builder(); for (Marker marker : markerList) { builder.include(marker.getPosition()); } LatLngBounds bounds = builder.build(); int padding = getActivity().getResources().getDimensionPixelSize(R.dimen.home_map_padding); // offset from edges of the map in pixels cameraUpdate = CameraUpdateFactory

How to create Google Latitude like markers?

非 Y 不嫁゛ 提交于 2020-01-13 04:44:10
问题 In my HTML5 app, I use Google Map v3 and add several markers on a map. It's easy to place new markers and to change icons but I'd like to be able to build markers like the one used in Google Latitude. Those markers are set up with an icon image and a nice border. Any ideas on how to do this ? 回答1: You could do this server-side or since you are using HTML 5 and assuming you have the canvas available you could do this on the client-side. Below is a way to do it client-side using the HTML 5

How to trigger custom info window programatically in Android

点点圈 提交于 2020-01-11 09:15:10
问题 I use custom window info, however, calling marker.showInfoWindow(); always renders default window info, whilst if the user clicks on the marker, custom window info are rendered without problem. Can I programatically open my custom window info? My case is that when the markers are drawn on the map, one particular marker should show its window info (so no user interaction), but preferably a custom one, as defined in my CustomWindowInfoAdapter class. EDIT, would gladly delete this question, it

Google Maps API v3: custom markers not clickable on mobile devices

会有一股神秘感。 提交于 2020-01-11 06:36:11
问题 We have a site that uses Google Maps API v3 to display a bunch of markers on the map. The markers are clickable, and open a standard Google Maps info popup. This works great on all desktop browsers. But for some reason, I can't make it work on any mobile device that I've tested (a variety of Android and iOS devices). The markers simply don't respond to clicks. I've narrowed it down to our custom markers. If I remove the code that loads our custom marker images using new google.maps

How to enable and disable the drawingControlOptions in Google Maps?

浪子不回头ぞ 提交于 2020-01-11 03:15:08
问题 I am having three different buttons for drawing shapes. Clicking each button the exclusive drawing option should be enabled and also the other options should become disabled. My code is following. drawShape.js File The following is my Javascript code. I am having three separate methods to draw shapes(circle, rectangle, polygon). By the below code, by each click I am getting new drawing controller. Please me to correct it. google.maps.visualRefresh = true; var rectangles = []; var coordinates

How to hide the numbers on a cluster marker in Google Maps?

百般思念 提交于 2020-01-10 06:00:34
问题 So I have this: But what I want is this: I'm pretty sure there should be an option I can specify here: var options = { gridSize: 80, imagePath: imagePath , someOption : iAmMissing ?? } var mc = new MarkerClusterer(map, mapmarkers, options); google.maps.event.addListener(mc, 'clusteringend', function(){ setTimeout(fixMyPageOnce, 1); }); But I can't seem to find an option. Is this the right place or is there another way I can get rid of the numbers in the circles? 回答1: Create a custom

map.setmylocationenabled(true) not working

六眼飞鱼酱① 提交于 2020-01-10 03:47:04
问题 I'm working with Google Maps in my android app. I need to recenter the map to the client's current location. I used the following statement - map.setmylocationenabled(true); This displays a button on the top right but clicking that doesn't work. The button click listener: mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() { @Override public boolean onMyLocationButtonClick() { mMap.addMarker(new MarkerOptions().position(myLatLng).title("My Location")); mMap

How to animate google map v2 marker on the polyline path?

你离开我真会死。 提交于 2020-01-10 02:59:27
问题 I already build an app using google maps V2 and put 2 markers on the map. First marker is to get user current location, and the second marker is user destination location. And then I add decodePoly method to draw line between those markers. I also add method to give user information about durations,start address and destination address using alert dialog. So, when I click the second marker, i want to animate that marker to "move" to first marker. But my problem is, the second marker is not