javascript - jQuery Geocomplete - 删除谷歌签名

标签 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>

但是我在打字头中得到了这个小的 google 签名图标-

enter image description here

有什么办法可以去除吗?

最佳答案

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

If you also show a Google Map, it is OK to hide the logo:

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

You can hide it using 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;
}

关于javascript - jQuery Geocomplete - 删除谷歌签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37373250/

相关文章:

javascript - jsPlumb 落在目标元素上,而不仅仅是端点

javascript - 获取可拖动后面的每个 div 的 id

jquery - 如何提交正确的 div 元素(而不是隐藏的 div)?

php - 匹配半径内的经度和纬度

javascript - Google map 标记未通过 ajax 动态显示

Javascript 更改所有输入的文本

c# - 为什么JScript中的同名变量和函数会发生冲突?

javascript - 从不在 DOM 树中的 jquery 对象复制 Canvas 节点

javascript - 如何显示/隐藏我可以与之交互的图像?

google-maps - 如何在没有谷歌地图的情况下计算边界中心?