google-maps-api-3

Google Maps v3 - Adding makers results in duplicate markers

Hi guys, I'm having some problems with Google Maps v3. I have an event listener on "bounds_change" that adds all accommodations(markers) within the active bounds. When i move the map slightly, the same markers are added again because they are located in the bounds. So every time I move the map, duplicate markers are added. How can I ma...

How to detect that a point is inside a Polygon using Google Maps ?

Hello, I would like to detect that a google.maps.LatLng is inside a google.maps.Polygon. How can I do that ? Cheers, ...

Google Earth integrated with Google Maps API v3?

Hi everyone, I'm trying to integrate Google Earth into Google Maps, and I saw it was possible in v2. But I can't find any doc about how to do so with v3... Any idea? Thanks! ...

Google Maps API V3 and stringByEvaluatingJavaScriptFromString?

Hi, I'm writing up an iPhone app using the Google Maps API V3, and I was wondering if it is still possible the use the stringByEvaluatingJavaScriptFromString function in the (void)webViewDidFinishLoad:(UIWebView *)webView function? A simple example being changing the map type (Assuming basic map setup): - (void)webViewDidFinishLoad:(UIW...

Google Maps JS API v3 - Simple Multiple Marker Example

Fairly new to the Google Maps Api. I've got an array of data that I want to cycle through and plot on a map. Seems fairly simple, but all the multi-marker tutorials I have found are quite complex. Lets use the data array from google's site for an example: var locations = [ ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach'...

Making AJAX requests when a Map is changed by the user with the Google Maps Javascript API

I'm building a website with ASP.NET MVC where one feature displays some points on a Google map, using the Google Maps Javascript API. As I have a lot of points, I don't want to fetch them all; rather, I want to get only the ones that are in the current view area that the user is looking at on the map (the bounding box). To do that, I wi...

How can i toggle google maps markers?

Hey guys. Is there a way of quickly show/hide of google maps markers? I don't want to remove/re-add every time, because I basically need to display them only on mouseover and hide on mouseout. I tried with marker.hide() But I kinda get an ugly error because it seems that hide is available on gmaps2 but not on gmaps3 api. Thanks!...

Binding class method to event in google maps v3?

In V2 of the Google Maps API, you could bind map events to a class method using the GEvent.bind function: GEvent.bind(this.drag_marker, "dragstart", this, this.start_dragging_route); In the example above pretend that's a link from a prototype.init function, where start_dragging_route is a method inside the class. It appears that the ...

Can I provide addresses instead of latitude and longitude to Google Maps?

Hi, I'm building an application where users provide the addresses for their listings. It's certainly not practical to ask a simple user to provide the latitude and longitude for each address he provides! Can I provide addresses to Google Maps API instead? If so, how? Thanks. ...

How to get the center of a polygon in google maps v3?

It doesn't need to be 100% correct, it can be the center of the bounding rectangle. Thank you in advance ...

Parsing Json to display polyline/markers with google maps v3

I'm using Jquery getJson() to generate a json to be displayed on the google maps 3 api. I would like to display the poly line as per the : polyline-simple example function initialize() { var myLatLng = new google.maps.LatLng(0, -180); var myOptions = { zoom: 3, center: myLatLng, mapTypeId: google.maps.MapType...

Programatically generate Google Maps markers (API v3)

Is it possible to programatically generate markers in Google? For example, I have a database of services and locations that I want to plot on a Google Map using PHP. Using the Maps API v3, I have created a map and plotted the services fine using markers and info windows, but what I really want to do is generate numbers (1,2,3,4... etc.)...

Google Maps API V3 - need help with multiple markers

I'm pretty new to google maps so please be patient! My code was working fine untill i tried to add multiple markers, would really appreciate it if anyone could glance at it and see if i'm missing something... $(function() { var map_markers = [ [ [52.951946], [1.018124] ], [ [52.955311], [0.987997] ] ]; var options = { ...

google maps api v3 no labels?

Is there a way to turn off all labels (street names, state names, country names etc.) from google maps using the API v3? Or are these built directly into the map images? ...

Google-Maps v3: How to change the map style based on zoom level?

I am using the new Google Maps v3 STYLED MAP. I want to change how the map is Styled based on the zoom level. I have the following pseudo-code, how do change my map-style based on the zoom level? var myOptions = { zoom: zoom, center: latlng, disableDefaultUI: true, navigationControl: true,...

Google Maps v3: Markerclusterer not being fired?

I have a bit of a puzzle on my hands. I'm Using Google Maps v3 and MarkerClusterer v3. When I load my page, the map appears, the points are all there, but nothing is clustered. If I go to the firebug console and do: markerCluster = new MarkerClusterer(map, markers); Suddenly clustering works. Weirdly, If I put an alert between the m...

How do I limit panning in Google maps API V3?

In V2 there was a way to limit panning/dragging so the map stays within certain bounds. How is that done in V3? Let's say I want the users to only look at Europe. I've already limited the zoom, but if I allow dragging (which I have to in this case, for other reasons) then the user can pan beyond the area I want to show. Please give wo...

Google maps api V3 - Adding multiple markers dynamically from query results

Hi there. I'm trying to set up a map on a page with a couple of links set up underneath that when clicked, will dynamically query my database and the result set output on the map. I've spent quite a lot of time googling this but can't find quite what I'm looking for. I've got as far as using AJAX to return the lat and lon coordinates OK,...

Small Google Maps Infowindow - Smaller than 200px

I have a map_canvas with a width of 225. I want my infobox to be smaller than this (eg. 150 px). Is this possible? I tried maxWidth and adding styles, but nothing seemed to work. A screen (on imgshack) can be found below: Also, I'm using v3 of Google Maps Javascript: var results_coods; var map_2; var marker_2; var infowindow_2; f...

Is it possible to style military bases only with the new Google Maps v3 styled map?

Already asked on Google groups, not getting any responses... I was playing with the Google Maps v3 style wizard and noticed that if you set a style for poi only, it will set the style for military bases. Unfortunately, it also sets styles for all other points of interest. Anyone know if there is a way to style military bases only? poi....