google-maps-markers

Google Maps Multiple Custom Markers

China☆狼群 提交于 2019-11-27 04:28:40
问题 So I'm trying to learn how to make a google map. I have very little understanding of javascript but am trying to learn here. I referenced a code online and I got to the point where I sort of understand how to add locations, marker, and a infowindow but I'm trying to figure out how to add multiple custom icons for each marker. Thanks for the help. function initialize() { //add map, the type of map var map = new google.maps.Map(document.getElementById('map'), { zoom: 6, center: new google.maps

Move GMSMarker on Google Map Like UBER

对着背影说爱祢 提交于 2019-11-27 04:27:07
问题 I am developing some navigation tasks on google map. I have to move markers as vehicles moves with turns as uber does in their app. I have tried different solutions as offered on @SO but It is not working as I need. I am getting angle with previous lat/long with current lat/long and animating mapwithBearing with that rotation Here is code [CATransaction begin]; [CATransaction setAnimationDuration:2.0]; NSDictionary *data = [[result objectForKey:@"returnData"] objectForKey:@"data"]; if (![data

JS Maps v3: custom marker with user profile picture

自闭症网瘾萝莉.ら 提交于 2019-11-27 04:26:51
I am struggling since 2 days with something I was thinking easy, on a map, I have to display a marker for each user with the user FB profile picture inside. I am wondering how I can have a result similar to this one? What I tried was really hackish. I put the FB picture as the marker icon I put a CSS class on the label of the marker I find the sibling to add this border and this arrow to decorate the user picture but it doesn't work when there is more than one marker on the map. .marker-labels { display: none !important; + div { background-color: $dark-gray; border: 2px solid $dark-gray;

JS Google Maps API v3 Animate Marker Between Coordinates

老子叫甜甜 提交于 2019-11-27 04:23:00
问题 I have a simple javascript maps application that I'm working on that requires me to animate the movement of multiple markers between different coords. Each marker is free to move on its own and all markers are stored in an array list. However, I have been having trouble getting them to smoothly transition locations. I've done a ton of research and trial/error but no luck, anyone have any luck with this? 回答1: My quick-and-dirty approach does not involve a ton of research :( Here's the demo:

Android Maps Utils Clustering show InfoWindow

我们两清 提交于 2019-11-27 04:17:14
I am planning to use the google maps marker clustering available in the utils library, but the google example app only shows marker clusters without any infoWindow. I am wondering now, am I not able to show a InfoWindow? I want the InfoWindow to be displayed on the marker like with a normal google maps marker, not on the cluster. The code I have: (From the google example) public class BigClusteringDemoActivity extends FragmentActivity { private ClusterManager<MyItem> mClusterManager; private GoogleMap mMap; private void readItems() { InputStream inputStream = getResources().openRawResource(R

Google Maps Marker — set background color

*爱你&永不变心* 提交于 2019-11-27 03:49:04
问题 I'm using a transparent PNG as my marker, and would like for the transparent area to be filled a certain color. I previously accomplished this using marker shadows, but those don't work with the visual refresh (i.e. v3.14). Thanks! 回答1: A trick could be to manipulate the PNG image with PHP, if this is an option. The following script takes 4 parameters: the image source, the amount of red, green and blue. image.php script: $src = $_GET['src']; $r = $_GET['r']; $g = $_GET['g']; $b = $_GET['b'];

Is it possible to write custom text on Google Maps API v3?

不羁岁月 提交于 2019-11-27 03:34:13
Is it possible to write a custom text on Google Maps API v3 next to the marker, or I can use only the info window to do that? Michal To show custom text you need to create a custom overlay. Below is an example adapted from official Google documentation. You could also use this library for more "stylish" info windows <html> <head> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script> <script> //adapded from this example http://code.google.com/apis/maps/documentation/javascript/overlays.html#CustomOverlays //text overlays function TxtOverlay(pos, txt,

How to implement GMUClusterRenderer in Swift

天涯浪子 提交于 2019-11-27 03:31:34
问题 I am using Google Maps API for iOS and want to use marker clustering utility. I figured out how to show clustered markers, but I would like to customize markers. Can someone explain how to set/change icon and title of each marker or clustered markers? An example code would be very helpful. class POIItem: NSObject, GMUClusterItem { var position: CLLocationCoordinate2D var name: String! init(position: CLLocationCoordinate2D, name: String) { self.position = position self.name = name } } class

How to know which Marker was clicked on Google Maps v2 for Android?

孤街醉人 提交于 2019-11-27 02:47:00
问题 I am making an application with a Google Maps on it, for Android. I have plenty of Markers on my screen and I am preparing customizable balloon for each marker when they are clicked. This means, I have information which is different according to the marker which was clicked. I set up the contents of the View of the marker with setInfoWindowAdapter and then I override the method getInfoContents. The problem is: This method is the general implementation of the contents of the Info Window, but

Google Maps Api v3 - how to remove cluster icons?

只愿长相守 提交于 2019-11-27 02:36:24
问题 how can i remove all cluster icons (cluster markers) from map? tryed with advices like: Google Maps API v3: How to remove all markers? ... but it did not worked. can you help me how to achieve that? thank you in advance! UPDATE (2010-11-23) markers are stored in array with var markersClust = Array(); ... and are added with (combination with php): markersClust.push(marker_<?php echo $team["Team"]["id"]; ?>); var markerClusterer = new MarkerClusterer(MyMap.map, markersClust, clusterOptions);