google-maps-api-3

Google Maps API 3. Text selection in overlays.

How to make a text selection in my overlays? Now my overlays inactive for text selection and creates a zoom when i double-click in overlay. http://img121.imageshack.us/img121/9022/overlayph.png ...

Good way to load multiple lat/long points from a database into google map markers?

I have a table containing multiple addresses, including their Lat/Long coordinates, and I want to place many of these markers onto a google map at once, using asp.net webforms and Google Maps Javascript API V3. The tutorials show how to add one marker: http://code.google.com/apis/maps/documentation/javascript/overlays.html#Markers var...

Google maps V3 GSize has changed

I am switching google maps from v2 to v3 and I am running into a problem with finding the conversion from GSize. Does anyone know how to make the change. opts = { 'labelText': infoname, 'labelClass': 'citymarkers', 'labelOffset': new GSize(-35, -40) }; var marker = new LabeledMarker( new google.maps.LatLng(this.lat, th...

Adding click listener to Google Maps v3 Compass (navigation control)

I am trying to figure out how i can attach a click event to a google maps v3 compass. I have created a function that re-draws markers on a map and want this to be fired when the user click on the compass (arrows top left) of the google map. I am working with google maps v3 and cant seem to find any way of doing this through the documen...

jquery css selector to addClass to divs with background image of...

I'm working on an advanced map application in Google Maps API V3. I'm using an array of lettered markers for the pins on the map (A-J). I've written some jQuery to grab add a different class to each div that contains the marker as a background image so that I can animate the markers. Here's the code I'm using to do this: $('.markersHold...

What is openInfoWindowHtml and GPolygon in google maps V3

var polygon = new GPolygon(polylines[0],"#FFFFFF", 1, 1.0, color,opacity); polygon.hid = this.id; polygon.heat = this.heat; google.maps.event.addListener(polygon, 'click', function(point) { HoodsUnselect(active_hood_id); active_hood_id = polygon.hid; polygon.setOptions({fillColor: '#2948e4', fillOpacity: 0.50 }); /...

How can I make infowindows resize for tweets in Google Maps v3 with Javascript

Hi, I'm trying to add a few tweets to an infowindow in Google Maps. I get the tweets to display in a div that is the content of my infowindow, but it's the wrong size. I thought by calling 'content_changed' when the marker is clicked, the infowindow would resize - it doesn't. I'm sure this is pretty straightforward, can someone help m...

Can the v2 and v3 Google Maps API coexist on the same page?

Hey there, I have an issues/bug when trying to have a v3 and v2 google maps on the page at the same time. The core of our application uses v2 of the API and adding some new functionality we decided to use v3 of the api since v2 is deprecated. So I'm dynamically loading the v3 version of the api in another "tab" on the application. The...

Creating sidebar from Google API V3 KML Layer

Google exposes data in a KMLFeatureData when you click entities in a KML Layer. However, there doesn't seem to be a good way to get the individual Markers, Polylines, or Polygons. What methods do people use to generate sidebars or lists of the elements in a KML layer? I've thought of maintaining a separately parsed list to generate a ...

Getting the bounds of a polyine in Google Maps API v3

Is there any easy ways to find the bounding box of a polyline using Google Maps API v3? I'm working on a project where I need to update the bounds as data is added and removed from the map. This is pretty easy by just doing bd.extend(point) where bd is the bound object and point is a LatLng object. The problem is when I start removing da...

Remove marker listeners

somewhat simple problem(to explain) this time: i have an array of markers that i equip with eventlisteners thusly: for (i in markersArray) { google.maps.event.addListener(markersArray[i], 'click', function() { //stuff it does google.maps.event.removeListener(?????) //remove self... but HOW?! });} as i mention in t...

How to get the user's location from iPhone using Google Maps API v3?

I want to make a google map on the iPhone and show the user's location when they first open the site. But i can't find this method on Google Maps v3 api. So i think maybe the iPhone has the function to do this. Does it? ...

Render google maps link as polyline

I want to display a couple of routes on a map, but I would prefer to first draw them with google maps. For example, I got directions from Seattle to San Diego, then moved things a bit, and the link looks like this: http://maps.google.com/maps?f=d&source=s_d&saddr=1521+NW+54th+St,+Seattle,+WA+98107&daddr=42.488302,-124.541016...

In Google Maps V3, how can I get a draggable marker to pan the map?

I have found several V2 examples of how to pan the map while a marker is being dragged. For example: http://www.putyourlightson.net/projects/coordinates // create map and add controls var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); // set ...

How do I make a single event handler for all markers in Google Maps V3?

I understand that if I have multiple markers on a map, and I need to handle clicks on them, I have to set up a handler for each marker like so: // ... var marker = new google.maps.Marker({position: new google.maps.LatLng(55, 37)}); marker.setMap(map); var listener = google.maps.event.addListener(marker, 'click', function(event){ // ...

Google Maps V3 StreetView not displaying on second setVisible() call

EDIT: Heard back from Google, they've confirmed this is an issue on their end. EDIT2: my contact at Google has informed me they've fixed this bug. I've got a troublesome bug using the Google Maps V3 API. If you set up a map, switch to streetview, close streetview, then reopen, the imagery appears blank (though the controls still displ...

Google Maps: bind click event or info window to OverlayView

Any ideas on how to bind a click event to an OverlayView in v3 of the GMaps API? The overlays seem to be buried under the map's panes so clicking on the overlay results in just a zoom. I'd ultimately like to bind an infowindow to the overlay but just being able to click it would be a fine start. Would just changing the z-index be the ...

ASP.NET MVC 2 and Google Maps Javascript API Version 3

Somehow I cannot get a simple map to work in a ASP.NET MVC 2 application with Google Maps Javascript API V3. I have tried the following: Site.Master: Removed <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; Added <!DOCTYPE html> Added this in < head > <script type="...

Keep a Google Maps v3 Map Hidden, show when needed

Hi, Is there a way of preventing Google Maps (JS, v3) of being displayed from the get-go ? I do some pre-processing and would like to show my 'Loading' spinner until everything is good to go (more eloquently put, hide the map -- e.g. the container div -- until all preprocessing is complete -- at which point, show the map). Hooking to ...

Make custom overlay clickable (Google Maps API v3)

I have a custom overlay class (ImageOverlay) which inherits from google.maps.OverlayView. I want it to respond to Google Maps click events (not just DOM click events) but simply using addListener doesn't seem to do the trick. e.g. I have a shapes array which contains a mixture of google.maps.Polgon and ImageOverlay objects: for (var i...