google-maps-markers

How can i show label/title for marker permanently in Google Maps V3

≯℡__Kan透↙ 提交于 2019-11-28 18:20:41
I want to display Markers on Google map with title displayed under them as shown in picture Now this i read was possible in v2 using ELabel but is deprecated in v3. Is there any possible way to show some text under icons of markers in Google Maps V3? Since at least October 2016, the official API provides a way to add permanently visible labels that are longer than one letter. See this reply by a Google project member . var m = new google.maps.Marker({ position: new google.maps.LatLng(lat, lng), label: 'Hello world', }); By default, the result looks like: Pretty unreadable. Fortunately the API

google maps v3 marker info window on mouseover

折月煮酒 提交于 2019-11-28 16:57:58
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 here: http://www.pretravelvideo.com/gmap2/ The functions.js file does most of the work here: http://www

Google Maps Api v3, custom Cluster icon

微笑、不失礼 提交于 2019-11-28 16:51:21
how can i change cluster icon? i wolud like to have same icon, with some other color than blue. 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/images/m1.png", width: 53 }, { height: 56, url: "https://github.com/googlemaps/js-marker-clusterer/tree/gh

Google maps open info window by default?

我的梦境 提交于 2019-11-28 16:42:24
问题 The following example shows a simple Marker (standard icon) on Google maps for the location and when clicking the icon, it opens the info window. Can I show the info window open by default so that I don't need to click the icon to open? var myLatlng = new google.maps.LatLng(-25.363882,131.044922); var myOptions = { zoom: 4, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var contentString = '<div id=

Google maps: place number in marker?

ぐ巨炮叔叔 提交于 2019-11-28 16:31:33
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. 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) 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 immediately with multiple color options: https://github.com/Concept211/Google-Maps-Markers Use the following format

Use a URL to link to a Google map with a marker on it

夙愿已清 提交于 2019-11-28 16:09:10
I want to link to google maps at a particular location with a marker on a particular point. It's easy to link to a location: http://maps.google.com/?ll=XX.XXXX,XX.XXXX But how do I drop a marker at that point too? preferably with a bit of my own text but that's just a bonus. 2017 - Google has released documentation on this see new accepted answer: https://stackoverflow.com/a/44477650/359135 xomena In May 2017 Google launched the official Google Maps URLs documentation. The Google Maps URLs introduces universal cross-platform syntax that you can use in your applications. Have a look at the

Resize Google Maps marker icon image

徘徊边缘 提交于 2019-11-28 15:45:30
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" }); } Catherine Nyo If the original size is 100 x 100 and you want to scale it to 50 x 50, use scaledSize instead of Size. var icon = { url: "../res/sit_marron.png", // url scaledSize: new

Google maps v3 draggable marker

ⅰ亾dé卋堺 提交于 2019-11-28 15:44:51
问题 I'm new in google maps, and I'm trying to learn it. marker = new google.maps.Marker( { map:map, draggable:true, animation: google.maps.Animation.DROP, position: results[0].geometry.location }); This is my marker position, when I'm initialising the marker position than I know the place name (for example: XY street, New York,), but because of the draggable option it is changing, and my question is how can I get the new place name, what event handler do I need. 回答1: Finally I found the answer:

Lat, Lng doesn't update when I drag marker

有些话、适合烂在心里 提交于 2019-11-28 13:35:20
问题 Actually, I have a map with a dragable marker. That works fine, but I can't update lat and lng of the dragged marker. I've tried it with a few different Event listeners, but non of them work. Now I'd like to know if somebody can help me? My Code (I removed the scripts that you don't get confused): <script> function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 7, center: { lat: 47.532446, lng: 14.623283 } }); var geocoder = new google.maps.Geocoder();

Marker Using base64 encoded string

China☆狼群 提交于 2019-11-28 13:18:09
I am trying to use a custom marker on a Google Maps by using a base64 encoded string. Somehow it doesn't work. Try doing it as follows: var marker = new google.maps.Marker({ position: latLng, map: map, title: 'hello', id: 'hehehe', icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAA..." }); Edit: Just complementing: if you're using a server side language to generate the js, you can always insert some PHP/Python/whatever code to load the image and convert it to its base64 representation. Something like (PHP back-end): $path = 'path/to/my/image.ext'; $info = getimagesize($info); $ext =