google-maps-api-3

html- / styling of- tooltips in google maps api v3

I'm trying to work out how Google adds images and styling to their tooltips that appear over markers in google maps. An example of the desired behaviour can be seen here: http://maps.google.es/maps?oe=utf-8&q=hotels+in+sydney If you mouseover one of the hotel markers, you will see different styles (bold text, normal text), paragra...

How to get the MapOptions object from a map with Google Maps API v3

In Google Maps api v2 you could get parameters such as the map type, zoom etc directly from the map object. In version 3 you have the setOptions method to set some parameters, but there is no getOptions() or options to retrieve them. ...

How do I get the HTML of a Google maps marker?

How get HTML element from Google maps marker (v3)? <div style="overflow-x: hidden; overflow-y: hidden; position: absolute; background-image: url(...); top: 62px; width: 70px; height: 70px; background-size: ; left: 924px; z-index: 97; opacity: 0,01; cursor: pointer; background-position: 0px -420px; background-repeat: no-repeat no-repeat...

How can I get the smallest LatLngBounds that still contains a set of Lat/Long Coordinates in Google Maps JS API?

I need to plot a set of coordinates on the map in response to a user selection, and when it happens, I'd like to pan the map to focus on that set of points. How can I find the smallest bounding box (LatLngBounds) that contains all of the coordinates? ...

How can I transform a custom overlay in Google Maps to account for projection?

I'm developing an application that uses Google Maps API v3. I want to make custom overlays that are squares exactly 1000km on each side (each overlay is actually a 1000x1000 transparent png, with each pixel representing 1 square km). My current implementation is this: function PngOverlay(map,loc) { this._png = null; this._loca...

Google maps points to the correct location but does not show the location name.

I create a Google map for my site using the API. It points to the correct location but the problem is it does not show the location name. See: http://myrtlebeachsweeps.com/ticket/angelos-steak-and-pasta . Zoom-in. Notice that the map shows the name of Cancun Lagoon Golf but it does not show the name of Angelo's. This direct Google ma...

Google Maps V3: Loading infowindow content via AJAX

What is the best way to load content into my infowindow using ajax? Right now I am getting a similar effect using iframes but I am not that that happy with it. I thought this would be straight forward but its confusing me for some reason. This is how its working right now: var markers = []; var infowindow = new google.maps.InfoWindow...

google maps API v3 - how to draw dynamic polygons/polylines?

Hi, I have 4 days of experience with Google Maps Javascript API and i find their documentation and information sharing confusing at best. Does anyone have experience or knowledge on how to draw polygons/polylines on a google map (using Javascript API V3) similar to this example? (which i found on this blogPost from 2008) So far as my ...

Custom InfoWindow on Google Map v3 with Shadow

I have to add a custom styles Info Window to a Google Map. The rounded border has to go and I have to change the close button. I've found InfoBox from Google Maps Utility Library (http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries) wich works fine but it doesn't seem to support shadows. Does anybody know of any solut...

Using the Google Maps Javascript API v3, How do I produce the default infoboxes on click?

This is what I have so far. function init_map() { var places = [ { name: "Place 1", coords: new google.maps.LatLng(30.728752, -73.995525)}, { name: "Place 2", coords: new google.maps.LatLng(30.733673, -73.990028)}, { name: "Place 3", coords: new google.maps.LatLng(40.725778, -73.992249)} ] var myOpti...

Why has "reset to initial map state" button been dropped in Google Maps API v3?

I wonder if we know why the "reset to initial map state" button / functionality seems to have been dropped in Google Maps API v3? In API v2, the hand button in the middle of the arrow buttons was a kind of "home" or "reset" button that retuned the map to its initial position and zoom level. Not the end of the world of course, merely cu...

Rich makers for Google Maps V3

Hi, Is there any implementation of markers who allow the combinaison of those functionnalities : html content like gmaps-v3-label-marker (http://github.com/adammck/gmaps-v3-label-marker) work with clusterer (http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/1.0/examples/simple_example.html). Based on marker and...

Event link between Jquery Datatable cell and Google Maps marker ?

Hi, I have to make a link in a Jquery Datatable cell (http://www.datatables.net/) and a marker on Google Maps V3. An exemple without Jquery Datatable is available there : http://code.google.com/p/gmaps-samples-v3/source/browse/trunk/sidebar/random-markers.html?r=142 Any idea ? Thanks in advance ! ...

Google Maps fitBounds is not working properly.

I have a problem with googlemaps fitBounds functions. for (var i = 0; i < countries.length; i++) { var country = countries[i]; var latlng = new google.maps.LatLng(parseFloat(country.lat), parseFloat(country.lng)); mapBounds.extend(latlng); } map.fitBounds(mapBounds); Some icons will be displayed outside the viewport / Visible are...

get all markers within a given radius in sql

I'm trying to get all locations stored in the database with an sql statement described here My sql statement is: SELECT TOP(10) *, ( 6371 * acos( cos( radians(<cfqueryparam cfsqltype="CF_SQL_Numeric" value="#FORM....

Google Maps API v3: Close infowindow when DOM element is clicked

Hi, I'm playing around with Google maps for the first time, so I looked at a nice tutorial over at CSS Tricks: http://css-tricks.com/google-maps-slider/ I like working with jQuery better than pure JS, and this tutorial makes a nice way to click on a place in a list to display the marker in the map. I liked it that way, but I need to ad...

Google Maps addDomListener on div added by jQuery only sees last iteration of loop

I've got the following simple script: var fruits = new Array("apple","orange","lemon"); $("#fruit_canvas").append("Mouse over these fruits:"); for(var i = 0; i < fruits.length; i++) { var fruit = fruits[i]; var html = "<div id='fruit" + i + "'>" + fruit + "</div>"; var fruitdiv = $(html); $("#fruit_canvas").append(frui...

Automatic Streetview transition in Google Maps v3

If you go to http://maps.google.com and zoom in until Google runs out of map the viewer automatically transitions to Streetview-mode (at least if Streetview is available at the location you zoomed in on). I'm mucking around with the Google Maps v3 API. Is there a way to replicate the map-to-streetview effect here? I can enable Streetvie...

google map local search, how to search address, local from a specific country only?

Hi, I'm using google map local search api and I'm trying to search and get result from a specific country only. Wonder If anyone have experience about this. ...

Google Maps API: colouring locations

Hi, Apologies if this is dead simple.. I can see that it's possible to draw on an area using overlays, but is it possible to just draw(colour) a location (a pair of longitude and latitude coordinates)? I need to colour a map by specifying a colour for every location I have available in my database. I'm also a bit concerned about th...