jQuery Geocomplete - 删除Google签名

时间:2016-05-22 10:38:43

标签: javascript jquery google-maps google-maps-api-3 geocomplete

我正在使用jQuery Geocomplete图书馆。

我所做的就是这个 -



$(function()
{
	$("#find_product_location").geocomplete(
	{
		map			: "#product_location",
		mapOptions	:
		{
			mapTypeId : 'roadmap',		//roadmap, satellite,hybrid, terrain,
			scrollwheel	: true,
			zoom: 10,
			center : new google.maps.LatLng(37.42152681633113, -119.27327880000001),
		},
		markerOptions:
		{
			draggable: true
		},
	});
	//var product_location_map = $("#find_product_location").geocomplete("map");	//Get the map for any more operation
});

#product_location
{ 
	width: 100%; 
	height: 400px;
}

<script src="http://maps.googleapis.com/maps/api/js?sensor=true&amp;libraries=places"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/geocomplete/1.7.0/jquery.geocomplete.min.js"></script>

<input id="find_product_location" type="text" placeholder="Type Your Address"/>
<div id="product_location"></div>
&#13;
&#13;
&#13;

但是我在类型头中获得了这个小的谷歌签名图标 -

enter image description here

有没有办法删除它?

1 个答案:

答案 0 :(得分:2)

来自https://github.com/ubilabs/geocomplete/issues/214

  

如果您还展示了Google地图,则可以隐藏徽标:

     

https://developers.google.com/places/webservice/policies#logo_requirements

     

您可以使用CSS隐藏它:

.pac-container:after {  /* Disclaimer: not needed to show 'powered by Google' if also a Google Map is shown */
    background-image: none !important;
    height: 0px;
}