google-maps-api-3

Google Maps API Business Search

I have been looking through the documentation for the API and not sure if it is possible to list multiple select stores near the submitted address. Ultimately something like the following website: http://www.evolutionofsmooth.com/locator/ It seems like they have each location stored in a db but I can't see it that likely since it would...

Calculate bounds from center and zoom (Google Maps API v3)

I need to calculate the bounds of a map given center and zoom level. I imagine I could temporarily set map center and zoom and call map.getBounds(), but I would prefer not to (I would need to disable/re-enable a few event handlers). Does anybody know how to do this in v3? ...

Rails: Submit javascript variables along with form

I'm using the Google Maps Javascript API so that I can have someone put a marker on a map and then get the latitude and longitude from that to submit as part of a form. I know how to get the data from the Maps api just fine, but I can't figure out how to submit the javascript variables that I have to the rails form? An event is called e...

Map Center in google map GEO Coding

Hi, I am using google map for showing driving directions between 2 places. The code is like this: var directionDisplay; var directionsService = new google.maps.DirectionsService(); var map; $(document).ready(function(){ directionsDisplay = new google.maps.DirectionsRenderer(); var chicago = new google.maps.LatLng(34.044756,-118.546677...

How can I automatically plot markers for addresses on a Google or OpenStreetMap?

I have a list of UK addresses and would like to plot them on a google or openstreetmap (I dont mind which). Is there a way to render a batch of addresses on a map with dots to represent the location (rather then the standard marker). To make things slightly more complex, I would like to change the colour and size of some markers. The...

JavaScript Google Maps API and web application on IPhone

Hi, I have developed a web application for mobile phones that uses JavaScript Google API. It works fine on any Android phone however on IPhone the map is not "dragable" - I can't move the map (I click on a map and try to move it but it stays the same as if I was trying to move a static image). I found some information pointing out that i...

[Android] How to implement a little static map preview as list icon?

I built a ListActivity and now I want to add Map Previews as the List Icons. I dont want to extend MapView because: 1st I just need a little static preview and 2nd I already extended to ListView. I already looked into using the static map api, however that also doesnt look quite good in that small dimensions: http://maps.google.com/m...

How to disable mouse wheel zoom on Google streetview?

Consider the following example code: http://code.google.com/apis/maps/documentation/javascript/examples/streetview-simple.html I can do scrollwheel: false on a mapOptions to disable mouse wheel zoom. The feature is not implemented on the streetview panoramaOptions. In Chrome, I can safely disable mouse wheel zoom on the streetview simp...

Google maps and iPhone

I'm developing simple application for smart phones. It works everywhere except iPhone. Code is dead simple: js: var initial_lat = 58.3972; var initial_lng = 15.5776; var initial_zoom = 15; var map; function initialize_map() { var initialLatLng = new google.maps.LatLng(initial_lat, initial_lng); var myOptions = { zoo...

How can I draw a path on a road on Google maps using the Android API?

I am trying to draw/highlight certain roads on a Google map through the Android API. I have seen examples where you can draw lines programatically, but I am looking for a way to draw, e.g., a red line from point A on a road to point B on the same road, possibly a different road. Anyone know where to look or what to look into? Thanks ...

Accessing Unlisted Map with Google Maps Data API in Javascript

How do you retrieve unlisted "My Map" data using the Google Maps Data API in Javascript without needing to authenticate the user? I want everyone that goes to my website to use the same map feed. Thanks ...

Google Maps v3 - can I ensure smooth panning every time?

My map has several hundred markers within a city. Usually no more than a 20 mile radius. I've read through the documentation and haven't found a way to set the init to automatically pan between every marker, no matter the distance. The default behavior is to pan if close, jump if far. I understand why they would do this since the map doe...

Google Maps v3 - limit viewable area and zoom level

Hi, is it possible to limit Google map v3 to a certain area? I want to allow displaying only some area (e.g. a country) and disallow the user to slide elsewhere. Also I want to restrict the zoom level - e.g. only between levels 6 and 9. And I want to use all the base map types. Is there any way to achieve this? I had a partial success...

Out of memory error when using Google Maps API

Hello, I have an application here that has a feature of showing a POI on the map. It's only one POI and it is only drawn when it's actually within the visible screen area. It works perfectly for a while but if I play around zooming in and out and dragging, it will eventually crash. According to Logcat, the reason is always an OutOfMemor...

Check StreetView availability with Google Maps Javascript API V3

I've got a webapp that uses Google Maps Javascript API V3 to display a regular googlemap and a StreetView side by side. When the map changes position, it tells the streetview to follow it using StreetViewPanorama.setPosition(). However, when I scroll the map to someplace where StreetView is not available, the streetview image stays stuc...

Google maps json geocoding, no response in browser

For whatever reason the following request gets no response from google. However if I paste the URL into the address bar it works fine. I'm not sure why this would happen. Is google filtering out requests by referrer headers? http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=3122%2C%20Australia $.ajax({ ...

Google maps - pass information into an event Listener

I think this is a scope problem. Since the event is triggered after I have added all the listeners num_markers has always been overridden by the next cycle in the loop. Is there some way I can pass variables to the event function? I tried this approach but it didn't for me. http://stackoverflow.com/questions/1841247/google-maps-event-l...

How to move GEvent.callbackArgs over to V3

I have the following code which works under V2 and I am trying to move it over to V3. The issue seems to be the access to the "this" object which holder the polyline to which the event is being added. (there are many such instantiations on the map so I don't necessary know which one is making the call when I receive the event, I can ob...

Calling an event listener in google maps v3 from a link

Hello, I'm trying to call the google.maps.event.addListener from a link. Here is the code I have so far: var divcc = '#badaba'; //click color var divhc = '#ffffce'; //hover color var divoc = '#FFF'; //original color var lastopenwin; var marker1; var marker2; //MAP----------...

map like MapTypeId.TERRAIN with dark water

Hello I can darken the water at the same time changing to a styled map so other values get reset. What I want is a map with green landscape like MapTypeId.TERRAIN has and darker water. I could manage make the water darker and now also want green landscape same way MapTypeId.TERRAIN has. Can you recommend a way? Thanks ...