Google Maps v3 - Why is LatLngBounds.contains returning false

后端 未结 3 1306
梦毁少年i
梦毁少年i 2020-12-14 07:58

I have the following code in which I would expect the contains method to return true, but it returns false:

var bounds = new google.maps.LatLngBounds(
    ne         


        
3条回答
  •  青春惊慌失措
    2020-12-14 08:27

    This is the way that it worked for me:

    var bounds = new google.maps.LatLngBounds();
    bounds.extend(54.69726685890506,-2.7379201682812226);
    bounds.extend(55.38942944437183, -1.2456105979687226); 
    map.fitBounds(bounds);    
    

提交回复
热议问题