google-maps-markers

Google Maps Api v3: How to change the Default waypoint markers in the Directions (set)Panel?

和自甴很熟 提交于 2019-12-22 01:29:43
问题 How do you change the markers with custom markers active in the map in the directions panel and change the color aswell from the body? Any help much appreciated. The screenshot: http://i.stack.imgur.com/wYFoc.png 回答1: Just to keep alive @MrUpsidown comment and code alive: Short answer: you can't. Longer answer: don't use the directions panel. Create your own, with the information you need (from the directions service response) and add your custom markers. Nov 24 at 16:32 Fiddle var

How to add markers on a map as users opens the activity, and update the realtime location of each marker as users move?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 20:39:20
问题 I have an activity in my app which has a Map in it and as users opens this activity from their devices, a marker is added showing their current location and then an inner Service class in which the code of updating the realtime location goes. Here's my code: mDatabase.child(rID).addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String s) { if (dataSnapshot.getValue() != null) { Map<String, String> newAcceptedUser = (Map<String,

Toggling on/off Markers in Google Maps API v3

最后都变了- 提交于 2019-12-21 20:17:06
问题 I'm having trouble getting the setMap(null); function that everyone seems to be recommending to work. I believe it may be a problem with the way I've implemented the markers. If someone could take a look and let me know if you see something wrong I'd greatly appreciate it. LINK: http://www.dougglover.com/samples/UOITMap/v2/ Please Note: Old link above, doesn't go anywhere. 回答1: The basic problem is that if you want this to work you've got to make up your mind about what the markersTest object

Compute the distance between polyline (route) and marker in Google Maps API v3

守給你的承諾、 提交于 2019-12-21 17:44:49
问题 Is there any convenient way to compute the direct (shortest) distance between Polyline (the route generated by Google Directions) and markers that are NOT situated on that polyline? The only way I found out is to cycle through Polyline.getPath() vertices manually to calculate the shortest distance but it seems to be a bit harsh: var path = routes[0].overview_path; for (var i = 0; i < data.points.length; i++) { var latLngA = new LatLng(data.points[i].lat, data.points[i].lng); var shortest

How to optimize MarkerWithLabel on google maps when having too many markers

牧云@^-^@ 提交于 2019-12-21 16:51:32
问题 I have been developing an application on google chrome, and I've been using the MarkerWithLabel library, which i believe is written by google developers. I am using a little over 100 markers on the map and it seemed to be pretty smooth until i checked in firefox (and lets not even mention IE). It is pretty damn laggy in FF. Any way to optimize it? http://jsfiddle.net/zDTNS/2 Here is a sample in jsfiddle To clarify, having 200 regular markers works fine. The problem shows up when using

Google Maps API v3 - GIcon is not defined

我是研究僧i 提交于 2019-12-21 07:56:33
问题 I know they are some issues from v2 to v3 what can i do here to fix it? GIcon is not supported by v3? // Google-Map icon object var gMapIcon = new GIcon(G_DEFAULT_ICON); //change to new google.maps.MarkerImage();??? // does icon exist if ( mapElements[lMapElementIndex]['icon'].toString().length > 0) { gMapIcon.image = html_entity_decode(mapElements[lMapElementIndex]['icon']); gMapIcon.shadow = ""; iconHeight = mapElements[lMapElementIndex]['iconheight']; iconWidth = mapElements

Unable to get GoogleMap OnMarkerClickListener to work

浪尽此生 提交于 2019-12-21 07:21:14
问题 Using V2 maps. Got it all basically working, including adding of markers. However, I need to take action when the marker is tapped, so I've installed a handler: thisMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { // Take some action here return true; } } ); Only problem is - onMarkerClick() never gets called at all. Cannot see why - tried creating the listener when the map was originally created and also after the

Get placeId on google maps when POI is clicked

独自空忆成欢 提交于 2019-12-21 05:47:10
问题 I'm using Google Maps JS V3 API on my website. I'm able to use getDetails by placeId when user searches for a place. I would like to do the same when user clicks on a POI. However, I can't seem to find a way to get this placeId when user clicks on a POI instead of using the search box. I have done research for days, and had no luck of finding anything close. I came across this feature request, I wonder if there is really no way of getting the placeId by POI clicking: https://code.google.com/p

Google Maps overlay disappears at certain zoom level

你说的曾经没有我的故事 提交于 2019-12-21 05:39:12
问题 I am having a problem with a custom overlay icon marker in google maps. It works fine at all zoom levels, but disappears at max zoom. In the demo only the lower icon disappears, but the upper one is ok. Demo: http://random.hypervolume.com/map_bug.html Try to zoom in on the lower marker, the one on 34-th street. At max zoom level it disappears. Here is the source: var map; function init() { var opts = { zoom: 14, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document

Using google street view with a marker, how do I point the POV at a marker?

ぃ、小莉子 提交于 2019-12-21 04:49:03
问题 I have a simple street view working to show me a street view given an address: var geocoder = new google.maps.Geocoder(); var address = "344 Laguna Dr, Milpitas, CA 95035"; geocoder.geocode( { 'address': address}, function(results, status) { //alert (results); if (status == google.maps.GeocoderStatus.OK) { //alert(results[0].geometry.location); myStreetView = new google.maps.StreetViewPanorama(document.getElementById("map_canvas")); myStreetView.setPosition(results[0].geometry.location); var