google-maps-markers

Firefox & Google Map API v3 : IndexSizeError

我怕爱的太早我们不能终老 提交于 2019-12-08 01:16:30
问题 I've got some troubles since a few days or a few weeks with a Google Map (using v3) in Firefox 20.0 (works well in Google Chrome), whereas it worked well before. When I load the markers dynamically (loaded from database with Ajax), I have in my console (Firebug) : IndexSizeError: Index or size is negative or greater than the allowed amount (102 out of range 43) I thought that there was a link with scaling images (saw this post), but it seems not. I've tried to set other width and height in

how to add marker cluster in google maps v3 for the same lat/long without influenting another element?

↘锁芯ラ 提交于 2019-12-08 01:11:37
问题 I made traceroute map. And I have problem with some markers that should be in the same lat/long but only one marker show on the map. I read that there's a way to do. It is marker cluster. but I don't know how to add in javascript. Also I'm afraid if that would be influent another element of markers which I've add like custom marker with label, infowindow and polyline. here is my code : <script type="text/javascript"> var pinImage = new google.maps.MarkerImage ("http://chart.apis.google.com

how can handle double click on marker in android application

此生再无相见时 提交于 2019-12-07 23:52:31
问题 I am displaying a vehicles on a map,when i click on vehicle it shows info window but i need double click on vehicle then it will goes to the new page.I don't know how to do,please help me.here is my code public class MapsActivity extends FragmentActivity implements OnMapReadyCallback,GoogleMap.OnMarkerClickListener { GoogleMap mMap; RequestQueue requestQueue; ArrayList<LatLng> points = null; PolylineOptions polylineOptions; Geocoder geocoder; LocationListener locationListener; TextView tv,tv

Keep Google Maps marker in centre of map while dragged?

谁说胖子不能爱 提交于 2019-12-07 21:07:08
问题 I'd like to display some crosshairs in the very centre of a Google Map. Currently I have code like this: var mapCentre = map.getCenter(); reticleMarker = new google.maps.Marker({ position: mapCentre, map: map, icon: reticleImage, shape: reticleShape, optimized: false, zIndex: 5 }); google.maps.event.addListener(map, 'bounds_changed', function(){reticleMarker.setPosition(map.getCenter());}); Works great on a desktop, but not on mobile. On mobile the crosshairs don't stay in the centre of the

How to change default camera behavior when marker is tapped?

人走茶凉 提交于 2019-12-07 15:44:18
问题 In release 1.2 of the Google Maps for iOS SDK the default behavior of a tapped marker changed. The release note says: "The default behavior when a marker is tapped has been updated to also pan the camera to the marker's position" How can I get the old behavior back, i.e. not panning the camera center to the position of the marker? 回答1: Add the following method to your GMSMapView delegate implementation. GMSMapView will no longer center on the selected marker and brings back the existing

How can I automatically plot markers for addresses on a Google or OpenStreetMap?

こ雲淡風輕ζ 提交于 2019-12-07 13:48:32
问题 I have a list of UK addresses and would like to plot them on a google or openstreetmap (I dont mind which). Is there a way to render a batch of addresses on a map with dots to represent the location (rather then the standard marker). To make things slightly more complex, I would like to change the colour and size of some markers. The data source is a street address including postcode and a marker type (size, color). Does anyone know of a site, script, process to achieve this? The geographic

google map api v2 add icon from url android

偶尔善良 提交于 2019-12-07 12:06:52
问题 I have a project that retrieves latitude and longitude from web service and I add them to google map markers. I want to add custom icon for the markers from url. mMap.addMarker(new MarkerOptions() .position(new LatLng(dlat,Dlong)) .title(m.group(9)) .draggable(false) .snippet(m.group(1)+" "+m.group(10))); How I can add .icon with a custom icon from a link? 回答1: Use this method and use returned bitmap to display in map public Bitmap getBitmapFromURL(String imageUrl) { try { URL url = new URL

Adding time delay to google map geocode

╄→尐↘猪︶ㄣ 提交于 2019-12-07 11:54:26
I'm working on this map and trying to geocode around 150 markers but I'm hitting the geocode limit. How can I add a time delay to avoid hitting the limit? This adds a timer to the geocoding so each marker has a delay. // Adding a LatLng object for each city function geocodeAddress(i) { geocoder.geocode( {'address': address[i]}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { places[i] = results[0].geometry.location; // Adding the markers var marker = new google.maps.Marker({position: places[i], map: map}); markers.push(marker); mc.addMarker(marker); // Creating the

Can I use my own custom animated gifs as markers on Google Maps API?

雨燕双飞 提交于 2019-12-07 09:20:57
问题 I want to use different animated cartoon images (gifs) as markers on Google Maps; can I do this with the API? 回答1: Yes you can Live Example): var position = new google.maps.LatLng(59.219521,15.1419873); var marker; var map; function initialize() { var mapOptions = { zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP, center: position }; map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); marker = new google.maps.Marker({ map:map, draggable:false, animation: google

How to properly use complex SVG image paths in Google Maps

主宰稳场 提交于 2019-12-07 07:51:43
问题 I've created a little Google Maps page which displays the direction of a (for now) pre-defined point. This can be found here In this example I'm using a default arrow icon from the Google Maps API: icon: { path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, scale: 6, rotation: heading } However, I have my own custom SVG image (exported from Illustrator CS6) which I want to use in stead of the arrow. At first I thought I could just put the url to the svg image, with some size attributes like