google-maps-api-2

How would I position a marker at the bottom of the map in Google Maps v2?

I have a webpage that finds a store by postcode or name. I have just released an update to it so that contact details display in an info window coming from the marker. Due to the small size of the info window, after centering to the marker, the map pans down until it can fit the marker and info window in leaving the marker near the bot...

How to get the KML data from a GGeoXml object

I load an KML file into a google map object using the following code: map = new GMap2(document.getElementById("map_canvas")); geoXml = new GGeoXml(kml); GEvent.addListener(geoXml, "load", function() { geoXml.gotoDefaultViewport(map); // I would like to read the KML contents here }); map.addOverlay(geoXml); // ... I would like...

Google Maps - zoom to fit markers doesn't work when map isn't visible

I'm using the Google Maps API v2. I add markers to the map and then zoom to fit those markers. This works fine if the map is visible I do this. But if not - for example, if I have a tabstrip, and the map's tab isn't selected when the page loads - then when I do show the map, the zoom level and center are wrong. Here's a simple test case...

How to add labels on Google Maps Pinpoints?

Creating a google map with store locations within 50 miles of user entered address. Have map & pinpoints showing correctly but all of the pinpoints just have a dot on them. I'd like to be able to label them A, B, C, D, etc so that I can list out locations & addresses in sidebar. How would I do this? Here's the code I'm using to add my ...

Google Maps - Adsense ads not showing in Internet Explorer

I am trying to display adsense ads on maps, but internet explorer gives me a hard time once again. The ads show on all other browsers I tried (chrome, ff, safari, opeara) but internet explorer. Has anyone encountered this before? here is my code for the admanager: var publisherID = 'ca-pub-6630823543717184'; var adsManagerOptions = { ...

google maps api v2 - tens of thousands of markers

Hello, my problem is with XXk (aka XX000) markers, atm I have 7k markers and will be more, and more, problem is in marker database, because atm this is 4MB (link to my DB http://tinyurl.com/ybau9ce) and problem is, how load that fast? for example DOWNLOAD only this what are show now, DOWNLOAD because load I have with ClusterMarker and pr...

google maps api v2 - dynamic load (tens of thousands of) markers

Hello, how made with JavaScript+PHP+MYSQL and Google Maps API v2 dynamic load of markers? atm I have map follow example http://googlemapsapi.martinpearman.co.uk/infusions/google_maps_api/basic_page.php?map_id=8 but my marker_data_01.php (where are all markers listed -> look code of example) have atm 4MB and will only have more, an...

Does Google Maps API v3 allow larger zoom values ?

If you use the satellite GMapType using this Google-provided example in v3 of the API, the maximum zoom level has a scale of 2m / 10ft , whereas using the v2 version of another Google-provided example (had to use another one since the control-simple doesn't have the scale control) yields the maximum scale of 20m / 50ft. Is this a new "fe...

Best way to geocode UK postcode with Google Maps API?

What is the most effective and accurate way to geocode a UK postcode? Using the built in geocode object results in massively blurred results (lots of postcodes returning just a general area). Are there any free UK postcode geocoding services I can plug into via JavaScript? ...

Look for coordinates - display an info window with a name on Google Maps

In Google Maps v2 GClientGeocoder.getLocations() you can search for an address or for GLatLng. Is there a way to combine these two, namely: search for a string containing both values, something like Home @12.345,21.8970 have the result (anchored at the coordinates) on map with a place name (Home) in the info window? ...

GMap in iframe gets off-center

I have a Google Map (API 2) that used to work fine as a standalone page. However, when I load the map page within an iframe (with Thickbox), the map gets off-center: normally it's centered over Germany and in the iframe it centers on Iran, instead. How to make the map center correctly? My guesses: The problem can result from the if...

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...

Google Maps popup clickable problem?

I want to implement Google Maps in my web page, but I struck with one problem. I want to implement the Google popup info window that is clickable, i.e. the control in the below function. The xml file having the following fields: marker lat="43.65654" lng="-79.90138" html="university" label="university" control="http://www.google.com...

Google Maps API - Resizing generates blank white space

Hi, I'm working on what it looked to be like a very simple feature which is causing a little bit of a headache. I work with a GIS and we integrate it with Google Maps. One of the clients requested to be able to open a separate pop up window showing only the map. Opening the window wasn't a problem, but as I try to expand the width of t...

load google maps in javascript file

I want to load google maps dynamically so I only load them when needed but I keep getting the error google is not defined here is my code $(document).ready(function(){ if($('.geotags').length > 0){ $("head").append('<script type="text/javascript" src="http://www.google.com/jsapi?key=keytogooglemapsapi"&gt;&lt;/script&gt;'); ...

Change the color a Gpolygon with mouse event

I try change the color to one Gpolygon with a mouseover event map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(-39.875696,-72.624207), 9); pLat = 0.2; pLon = 0.2; p1Lat = -40; p1Lon = -73; p1Coor = [ new GLatLng(p1Lat, p1Lon - pLon), new GLatLng(p1Lat + pLat, p1Lon)...

linking selected markers to sidebar links (google maps)

trytyku.com/store_BACKUP/ What Im trying to do is highlight the sidebar link when a marker is selected. I've found a link on how to do it but it seems to be using an older version of goggle's map api so it doesn't seem to be working. http://econym.org.uk/gmap/example_map2c.htm Any ideas? thanks :D ...

Add numbering label to google map marker

May I know how to add numbering label to google map marker using google map api? Just add label, not trying to change the icon. Thank you. ...

Can the opacity of a Google Maps GInfoWindow or GMarker be changed separately from the maps opacity?

I've built a Google Map window that uses two tile layers. The opacity of each layer can be adjusted dynamically using javascript. When I adjust the opacity of a tile layer, all child controls including GMarkers and GInfoWindows inherit the opacity setting. Is there any way to ensure that the Markers and InfoWindows are always visible reg...

Google Maps API v2 load() event not firing

Hello, I'm improving the Google Maps API V2 integration in our web app and I'd like my main page to know when Google Maps has finished loading everything so I can then set some markers. I notice there's a load() event but I can never seem to get it fire. Here's the code I'm using if( GBrowserIsCompatible() ) { map = new...