google-maps-markers

google maps v3 marker info window on mouseover

点点圈 提交于 2019-11-27 10:06:19
问题 I have scoured stackoverflow and other forums including the google maps v3 api docs for an answer but I cannot find how to change the event that fires the marker info window from click to mouseover in the files I am working with. I am working with a demo from the google library that includes a fusion table layer. You zoom into the clusters and see the small red circle markers for locations. You have to click to reveal an info window. I wish to rollover to reveal the info window. My demo is

Google Maps Api v3, custom Cluster icon

北城余情 提交于 2019-11-27 10:01:32
问题 how can i change cluster icon? i wolud like to have same icon, with some other color than blue. 回答1: You need to use styles parameter when initializing MarkerClusterer object - the code below shows default styles so if you want to recolour one of the icons just change the relevant url to your image... //set style options for marker clusters (these are the default styles) mcOptions = {styles: [{ height: 53, url: "http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer

Google maps: place number in marker?

醉酒当歌 提交于 2019-11-27 09:41:25
问题 How can I display a number in the marker on a google map? I want to do server side clustering and I need to display how many points the cluster represents. 回答1: icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=1|FE6256|000000' Looks fine with 1-digit and 2-digit numbers (from Mauro's link) 回答2: Here are custom icons with the updated "visual refresh" style that you can generate quickly via a simple .vbs script. I also included a large pre-generated set that you can use

Resize Google Maps marker icon image

无人久伴 提交于 2019-11-27 09:20:22
问题 When I load an image into the icon property of a marker it displays with its original size, which is a lot bigger than it should be. I want to resize to the standard to a smaller size. What is the best way to do this? Code: function addMyPos(latitude,longitude){ position = new google.maps.LatLng(latitude,longitude) marker = new google.maps.Marker({ position: position, map: map, icon: "../res/sit_marron.png" }); } 回答1: If the original size is 100 x 100 and you want to scale it to 50 x 50, use

How to plot city in map via boundary line? [closed]

自闭症网瘾萝莉.ら 提交于 2019-11-27 09:08:06
问题 How can I plot boundary line on G-Map on the basis of city searched like in this image red line showing searched city map? I have see various links but unable to find a solution. Thanks 回答1: Currently Google Maps JavaScript API doesn't expose any boundaries of geographic features. There is very old feature request in the public issue tracker to add this functionality, however it looks like Google didn't set high priority on this task: https://issuetracker.google.com/issues/35816953 Feel free

Marker cluster number in a polygon or/and infowindow

杀马特。学长 韩版系。学妹 提交于 2019-11-27 06:32:15
问题 When you click on some polygon you got infowindow with the name of these polygon, is possible to put in this infowindow number of markers inside this polygon (same like marker cluster number) or to put this number (marker cluster number) on the polygon? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name=

Google Maps API v3 in PhoneGap: markers not drawing properly after move

情到浓时终转凉″ 提交于 2019-11-27 06:21:25
问题 I've been working on a Google Maps API 3 application on Android using PhoneGap. It should track the users location and mark the location with a marker and a circle around it. I had been developing this on Android 2.3 and it was working fine. I then upgraded to a phone with Android 4.x and it was still working well, I thought. Last week I began noticing it doing some strange things when I move the markers. It would seem to create a duplicate marker instead of just moving it. Same with the

Google Maps API Multiple Markers with Infowindows

若如初见. 提交于 2019-11-27 05:58:11
I am trying to add multiple markers each with its own infowindow that comes up when clicked on. I am having trouble with getting the infowindows coming up, when I try it either shows up only one marker without an infowindow. Thanks, let me know if you need some more information <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyB1tbIAqN0XqcgTR1-FxYoVTVq6Is6lD98

adding multiple marker on google map in android

夙愿已清 提交于 2019-11-27 05:41:15
问题 I am triyng to add multiple marker on google map. Here is my code section public class GoogleMap extends MapView { MapController mc; MapView mapView; GeoPoint p; @Override public void onCreate(Bundle savedInstanceState) { .... double lat = Double.parseDouble(bundle.getString("paramLat")); double lng = Double.parseDouble(bundle.getString("paramLong")); mc = mapView.getController(); p = new GeoPoint( (int) (lat * 1E6), (int) (lng * 1E6)); mc.animateTo(p); mc.setZoom(17); //---Add a location

Google Maps API - Closest marker function change to closest n markers

荒凉一梦 提交于 2019-11-27 05:41:14
I am using the formula found in this question to find the closest marker on the map to the current position. I would like to modify this formula so that it finds the closet n number of locations(closest 5 locations, closest 10 locations, etc.) and I am not sure how to accomplish this. Here is the modified formula I am using: function rad(x) {return x*Math.PI/180;} function find_closest_marker(center, map) { var lat = center.lat(); var lng = center.lng(); var R = 6371; // radius of earth in km var distances = []; var closest = -1; for( i=0;i<markers.length; i++ ) { var mlat = markers[i]