google-maps-markers

Marker content (infoWindow) Google Maps

空扰寡人 提交于 2019-11-28 04:09:05
I'm trying to add infoWindow's to multiple markers on a Google Map. The closest I have come is to get an infoWindow to display the last address you can see in the array, on all markers. The bit of code I have pasted below does not work, I get an "Uncaught TypeError: Cannot read property '4' of undefined". I'm sure this is a scope issue, but I'm going round in circles here and could do with some help: var hotels = [ ['ibis Birmingham Airport', 52.452656, -1.730548, 4, 'Ambassador Road<br />Bickenhill<br />Solihull<br />Birmingham<br />B26 3AW','(+44)1217805800','(+44)1217805810','info

Change individual markers in google maps directions

我怕爱的太早我们不能终老 提交于 2019-11-28 04:02:49
问题 I have an issue with adding individual markers in Google maps API. I searched a lot like the following link, Change individual markers in google maps directions api V3 . But I am unable to implement the same on my code. With the help of suppressMarkers: true I am able to prevent the default markers. Now only root directions are showing. Now how can I add the makers for start point and end point. Following is my code. function GoogleMap_selected(){ var lattitude_value= document.getElementById(

How to move a map under a marker?

旧城冷巷雨未停 提交于 2019-11-28 03:41:39
Suppose that we have a centered marker on the map, when we move the map with our fingers we can see that marker would no longer displayed when you got out of bounds of the area. So how can we make a marker that would remain always on the center of the map although we move the map anywhere? There is an app named UBER and they provide this feature, you don't drag and drop the marker you just move the map and the marker remained it's position. Here is a screenshot: As you can see green marker is on the center of screen when we move the map it remained its place but shows the new position when the

Customize Google Maps blue dot for current location

人走茶凉 提交于 2019-11-28 03:07:11
问题 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. 回答1: 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

Javascript, Change google map marker color

孤人 提交于 2019-11-28 03:05:42
May I know a way to change the Google Map marker color via Javascript.. I am new at this and any help would be much appreciated, Thank you. I used the following code to create a marker marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), animation: google.maps.Animation.DROP, map: map }); In Google Maps API v3 you can try changing marker icon. For example for green icon use: marker.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png') Or as part of marker init: marker = new google.maps.Marker({ icon: 'http://...' }); Other colors:

Remove marker in Google Maps Api v3

我只是一个虾纸丫 提交于 2019-11-28 02:51:01
问题 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 ... 回答1: RemovingOverlays markersArray[markersArray.length-1].setMap(null); ... for path: path = poly.getPath(); path.pop();

Auto-center map with multiple markers in Google Maps API v3

泪湿孤枕 提交于 2019-11-28 02:33:30
This is what I use to display a map with 3 pins/markers: <script> function initialize() { var locations = [ ['DESCRIPTION', 41.926979, 12.517385, 3], ['DESCRIPTION', 41.914873, 12.506486, 2], ['DESCRIPTION', 41.918574, 12.507201, 1] ]; var map = new google.maps.Map(document.getElementById('map'), { zoom: 15, center: new google.maps.LatLng(41.923, 12.513), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var marker, i; for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations

How can i show text under marker

久未见 提交于 2019-11-28 01:23:05
问题 I have one problem when showing markers on a map. I would like to show some text below the marker, but I can not do it anyway. This is my example code, I wonder what I need to add to it to appear permanently when markers shows This is one part of my code example: loop htp.print('geocoder.getLatLng('); htp.print(''''||r_klt.geoloc||''''||','); htp.print('function(point) {'); htp.print('var baseIcon = new GIcon(G_DEFAULT_ICON);'); htp.print('baseIcon.shadow = "http://www.google.com/mapfiles

Android : how to reload custom markers once the image is downloaded via Picasso?

三世轮回 提交于 2019-11-28 01:20:04
问题 I'm trying to load dynamically users avatars as custom markers. I based my code on the google maps utils demo, but somehow it doesn't work, it loads only one image and all the others are empty: Here is my code: public class MapsActivity extends FragmentActivity implements ClusterManager.OnClusterItemClickListener<ModelUser>, ClusterManager.OnClusterItemInfoWindowClickListener<ModelUser> { private ClusterManager<ModelUser> mClusterManager; private GoogleMap mMap; // Might be null if Google