开发者

GoogleMaps API V3 disables all -webkit- transitions once its loaded on Safari... WHY?

开发者 https://www.devze.com 2023-04-03 09:02 出处:网络
I seem to have encountered a very strange problem. I wonder if anyone knows anything about it. Once a googlemapAPI3 has loaded on our webpage (currently offline) it disables all other webkit animatio

I seem to have encountered a very strange problem. I wonder if anyone knows anything about it.

Once a googlemapAPI3 has loaded on our webpage (currently offline) it disables all other webkit animations and transitions that we have on hover effects. I have no idea why but it seems to be limited to Safari only.

Any ideas on why this is happening?

Here's the JavaScript, let me know if you need anything else.

var directionDisplay;
  var directionsService = new google.maps.DirectionsService();
  var map;

  function initialize() {
      geocoder = new google.maps.Geocoder();
    directionsDisplay = new google.maps.DirectionsRenderer();
    var myOptions = {
      zoom:10,
      scrollwheel: true,
      draggable: true,
      navigationControl: false,
      mapTypeControl: false,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

    var address = 'SL5 8LT';
    geocoder.geocode( { 'address': address}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
        map.set开发者_开发知识库Center(results[0].geometry.location);
        var marker = new google.maps.Marker({
            map: map, 
            position: results[0].geometry.location
        });
      } 
    });
    directionsDisplay.setMap(map);
  }

$(window).load(function() {
             initialize();
        });
0

精彩评论

暂无评论...
验证码 换一张
取 消