google-maps-markers

Customizing clickable area on a Marker in Google Maps v2 for Android

丶灬走出姿态 提交于 2019-11-29 10:04:00
I am currently using Google Maps v2 API for Android and doing some custom overlays. For starters, I create a custom bitmap that is quite a big larger than the standard "marker". I know that using an older Maps API, you can create a custom overlayitem which controls the click-able area, but it must also be possible on the newer Maps API. I simply want my custom marker's click-able area to be the same as the custom bitmap icon I am setting it to. I have read over the examples and documentation and couldn't find anything. Any help would be appreciated. Thanks (Here is the doc I was reading) https

How to hide and show MarkerClusterer in google maps

谁都会走 提交于 2019-11-29 10:01:59
问题 i'm trying to hide/show markerClusterer when user clicks some buttons: Here is what i'm trying to do: map = new google.maps.Map(document.getElementById("mappa"),mapOptions); var marker_tmp = []; var markers_tmp = []; $.each(json,function(index,value){ var latLng = new google.maps.LatLng(value.lat,value.lng); var marker = new google.maps.Marker({'position': latLng}); if((value.candidato in markers_tmp)==false){ markers_tmp[value.name]=[]; } markers_tmp[value.name].push(marker); }); for(var

Customize Google Maps blue dot for current location

只愿长相守 提交于 2019-11-29 09:42:29
I'm using a 2013 version of Google Maps SDK for iOS. I would like to customize the default blue dot for current location with another icon or pulsing circles around. I know we can do that with mapView:viewForAnnotation: in MKMapView, but I can't found out how to do it with Google Maps. There is no way to do this with current version of the SDK (1.4.3), and actually there is an open issue with this request: Look here . As a work around, you can hide the default button with: _map.myLocationEnabled = NO; Then create a custom GMSMarker GMSMarker *pointMarker = [GMSMarker markerWithPosition

Marker click event on react native maps not working in react ios

一世执手 提交于 2019-11-29 09:33:26
问题 I have tried by calling onPress method in MapView.Marker Tab, but its not working. This method for tracking marker click: markerClick(){ console.log("Marker was clicked"); } In render method, Map components are declared to display map and markers on map. In onPress method I have called my custom method markerClicked(). Still I am not getting the result. render() { return ( <View style={styles.container}> <MapView style={styles.map} initialRegion={{ latitude: 37.78825, longitude: -122.4324,

Remove marker in Google Maps Api v3

心已入冬 提交于 2019-11-29 09:25:22
I'm using this function to add a new marker (and polyline) to a map: function addMarker(location) { path = poly.getPath(); path.push(location); marker = new google.maps.Marker({ position: location, icon:'location.png', title: poly.inKm() + ' km', map: map }); markersArray.push(marker); } How can I remove the last marker (for implementing undo)? Best regards ... RemovingOverlays markersArray[markersArray.length-1].setMap(null); ... for path: path = poly.getPath(); path.pop(); PolylineOptions , MVCArray . trs Last Marker is at the index of markersArray.length -1 so... markersArray[markersArray

How to disable marker click event?

偶尔善良 提交于 2019-11-29 09:22:35
I am developing an simple app, where I already displayed marker title with mrkr.showInfoWindow() but I don't want user to tap again that marker. How to disable clicking event of particular marker ? This is how I tried. Marker marker = gMap.addMarker(new MarkerOptions().position(new LatLng(location .getLatitude(), location.getLongitude())).title("I am here").icon(BitmapDescriptorFactory.fromResource(R.drawable.mrk1))); marker.showInfoWindow(); //how to use marker.setClickable here or somthing here.? How to display that infowindow()/title of my marker throughout my application ? You can set

Loading Markers from XML file to Google Map API

僤鯓⒐⒋嵵緔 提交于 2019-11-29 09:00:32
my goal is to be able to load markers from an sql database and display them on a googlemap. but im having a hard time just trying to read markers from an xml file. Here is my HTML file <!DOCTYPE html> <html> <head> <title>Simple Map</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <style> html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px } </style> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script> <script> function initialize() { var mapOptions = { zoom: 12, center:new google

howto: dynamically update markers from JSON on google maps

安稳与你 提交于 2019-11-29 08:51:01
I am trying to update the location of a marker with out refreshing the whole page. I have tried to use setTimeout(function() however I am having no luck.. here is my code I have so far.. thanks in advance function initialize() { var mapOptions = { center: new google.maps.LatLng(35.66, -80.50), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); var json = (function () { var json = null; $.ajax({ 'async': false, 'global': false, 'url': "getjson.php", 'dataType': "json", 'success': function (data) { json = data; }

Google map API marker with letter on map

做~自己de王妃 提交于 2019-11-29 08:48:06
Is there a way to access the colored markers with a letter from google? I can only use the red ones with letters like But I need green markers with a letter like I get it from the directions API from google. Like this one here Is there a way to access to the colored markers with letter? Or do I have to add the markers to my image folder? You must use : http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=D|00FF00|000000 chld parameter is the letter you want to appear in your marker. After the pipe, the first RGB code is the color of the marker, the second is the background color of

Open infoWindow of specific marker from outside Google Maps (V3)

大憨熊 提交于 2019-11-29 08:12:54
问题 I can't seem to get my head around this problem: I've got a map with (a lot of) markers (companies) that come from a generated XML file. Below the map, I want to show a (non-JavaScript-generated) list of all the companies that are displayed on the map. When I would click a company in the list, the map would pan to that specific marker and open an infoWindow. The thing is that I want the map and the list to be two separate things... What would be the right way to tackle this problem? Thanks!