IE8 Google Maps setZoom error - google-maps

I am having trouble getting the setZoom method for Google Maps to work correctly in IE8 on this site: www.savingthedream.org. The map is supposed to zoom on each pin drop when it is placed, and it is specifically IE8 that is not working. I panTo the pin drop right before setting the zoom, and it is panning correctly. Any help would be greatly appreciated.
Thanks

Just make sure the parameter is a number and it has a valid value.
You maybe want to check your parameter with typeof and parse it in need.
map.setZoom( parseInt(YOUR_ZOOM_LEVEL) )

Related

Google maps set heading not working and map remains on heading to north

I am trying to do: map.setHeading(180) but this doesn't work and map remains heading to north. Everything else is working - I am using the very basic template of Gmaps from their docs, zoomings, pannings, markers and other things work as excepted, but the heading not. What am I missing in here?
For example, I got the position and heading from the GPS and I move the marker using marker.setPosition(position) which also works as excepted.
Tilt and rotation are now supported programmatically and by user input when using WebGL rendering. Please see https://developers.google.com/maps/documentation/javascript/webgl/tilt-rotation for documentation and examples.
Try beta version of JavaScript API. add v=beta in url.
The reason for this is that you can use setHeading if your map is displaying 45 degrees imagery as stated on the documentation.
It looks like your use case is the same as this existing Feature Request which is requesting for a feature to change the orientation of the map. You can star the issue to receive updates regarding the issue. You can also leave a comment on the issue regarding your use case.

Map not displaying when address is geocoded using Geocomplete

My issue is when users enter their address (with autocomplete), the expected behaviour is that the map would display a marker on the address. But for some strange reason, the map does not display :(
Here is where my test environment is, please have a look:
http://mycanprev.com/onboard-test/
Click on the "Location" tab to get to the geocomplete portion. When you enter your address, it's suppose to display the map with the marker set on the entered address but it just displays a gray box instead of the map.
The map seems to display fine on mobile though.
I think the issue might be with the z-index, but I'm not sure how to fix it :(
Thanks for your help.
There's a lot of issue that caused the gray box in the maps. You can try this following solution:
First, make sure that you used the correct Google Maps API, valid API Key and not deprecated function calls.
Setting the zoom parameter correctly. Check this SO question 11749742 and 5838333.
Check the size of your maps DIV element and css. Check this SO question for that.

Google Maps disable directions and display map directly

I have searched on the internet to find out solution to this issue but i found nothing.
I have following address:
https://maps.google.com/maps?q=2755+Maple+Avenue,+North+Bellmore,+NY+11710&daddr=2755+Maple+Ave,+North+Bellmore,+NY+11710&oe=utf-8&client=firefox-a&channel=fflb&hnear=0x89c27ef151e2fa7d:0x2fde552872337fca,2755+Maple+Ave,+North+Bellmore,+NY+11710&gl=us&t=h&z=16
open in new window
When i click on above link in a mobile browser it opens a new page but instead of mapview it shows me directions panel, any one guide me how can i get rid of directions and display only mapview directly?
i have found a parameter dir=0 but i dont know where to use it.
any help would be appreciated.
https://maps.google.com/maps?q=2755+Maple+Ave,+North+Bellmore,+NY+11710&hl=en&sll=40.684429,-73.529315&sspn=0.010983,0.026157&t=h&gl=us&hnear=2755+Maple+Ave,+North+Bellmore,+New+York+11710&z=16
use this in your map may be its helpful for you

How to get the zoom level on maps.google.com using JavaScript?

I'm using bookmarklets to compare maps from different providers. I would like to get the zoom level from the current map showing on the maps.google.com site.
This is the only working solution I've come up with:
var zoom=gApplication.getPageUrl().split('z=');var z=(zoom[1].length>2 ? zoom[1].substring(0,zoom[1].indexOf('&')) : zoom[1]);
It's working OK for now, but I'm not feeling comfortable with it...
I have tried map.getZoom() , but map isn't correct for the maps.google.com -site. It works on some other sites where the map-variable has been named map.
you can use map.getZoom();
for more refrence read at http://www.w3schools.com/googleAPI/ref_getzoom.asp
hope it helps you out..

Google infowindow is not displaying correctly using their API

I am using the Google map API to integrate the map into my website, I am using custom markers and infowindows. I have used this previously with no worries but now, when I click on my marker, the infowindow displays incorrectly.
I have tried to many different things to try and fix it but I just can't seem to figure out whats going on.
here is an image, I can't attach it to the post since I am new and all that.
http://i47.tinypic.com/xbwmbq.png
Any help would be muchly appreciated.
Thanks
Did you change your DOCTYPE recently? I once had the infowindow start doing funny things like that when I switched to a different DOCTYPE.
Well, I thought I had fixed it, but it turns out I didn't. To fix it I had to turn the the dreaded iframe. Sadly, it will have to stay that way until I find a better fix.