2

I'm using Google Maps API v3 in my application. Maps Pan control isn't displaying properly on IE 10 and IE 11.

enter image description here.

It's working fine on Chrome, Mozilla and IE8, IE9. I can't figure out the way to resolve it.

on Stackoverflow, a nearly similar question is posted here: Google Maps zoom control

but not solution is not application. Definitely, it's the CSS issue, but I couldn't resolve it. I've checked in IE developer tool for any css class overriding, but no luck.

Have anyone faced the similar problem or anyone had any solution for this?

EDIT: The basic map is also disordered in my IE 11 version.![enter image description here] enter image description here]![enter image description here -- Anil

Community
  • 1
  • 1
Anil
  • 387
  • 2
  • 24
  • It doesn't happen for me with a [**basic map**](https://developers.google.com/maps/documentation/javascript/examples/map-simple) , we need to see your implementation. – Dr.Molle Apr 01 '14 at 11:21
  • @Dr.Molle The basic map is disordered on my IE 11. attaching screenshot to my question Edit as well. – Anil Apr 01 '14 at 11:36
  • 3
    Open [issue](https://code.google.com/p/gmaps-api-issues/issues/detail?id=4563) in the issue tracker (for IE10...) – geocodezip Apr 01 '14 at 11:44
  • Thanks @geocodezip. found solution by setting opacity to 0; – Anil Apr 01 '14 at 13:00

5 Answers5

1

Well, as @geocodezip suggested, it's a bug till today in Google map API and best solution for it is to use css.

use below css on the page :

.gmnoprint div[title^="Pan"]
 {
        filter:alpha(opacity=0)!important;
 }

hope it would help others and save time.

-Anil

Anil
  • 387
  • 2
  • 24
1

I just added the styling to my CSS , and fix

.gmnoprint div[title^="Pan"] {
  opacity: 0 !important;
}
0

An important addition to non-English localizations: You must use in style not "Pan", but the text specific to your locale. For example, for Russian localization - "Пан". Hover your mouse on a button of pan Control and look pop-up hint. In style the first 3 letters from it are used.

Sergey
  • 11
  • 1
0

FWIW - I've found that the above CSS isn't enough because we next get "+" for zoom in/out for street view. I made a slight modification...turn off all title items except the one we don't want hidden.

.gmnoprint div[title]
{
    opacity: 0 !important;
}
.gmnoprint div[title^="Exit Street View"]
{
    opacity: inherit !important;
}
Corey Alix
  • 2,694
  • 2
  • 27
  • 38
0

Late to the party I know, but when I came across this issue I implemented the following fix for my applications using Google Maps V3 which I know is similar to what has already been posted here, but just in case it helps as I know how damn frustrating these sorts of issues can be!

<script>
        var doc = document.documentElement;
        doc.setAttribute('data-useragent', navigator.userAgent);
    </script>
    <style type="text/css">
    html[data-useragent*='Trident/7.0'] div[title^="Zoom"]
     {
            opacity: 0 !important;
     }
     html[data-useragent*='Trident/7.0'] div[title^="Pan"]
     {
            opacity: 0 !important;
     }
    </style>
mindparse
  • 6,115
  • 27
  • 90
  • 191