Tag: infowindow

使用Google Maps API v3禁用兴趣点信息窗口

我有一个信息气泡和自定义标记的自定义地图。 当我放大景点,如公园和大学出现,当我点击一个信息窗口打开。 如何禁用信息窗口? 我的代码如下: var geocoder; var map; var infoBubble; var dropdown = ""; var gmarkers = []; var hostel_icon = new google.maps.MarkerImage('/resources/hostel_blue_icon.png', new google.maps.Size(28,32), new google.maps.Point(0,0), new google.maps.Point(14,32)); var bar_icon = new google.maps.MarkerImage('/resources/bar_red_icon.png', new google.maps.Size(28,32), new google.maps.Point(0,0), new google.maps.Point(14,32)); var icon_shadow = new google.maps.MarkerImage('/resources/myicon_shadow.png', new google.maps.Size(45,32), new google.maps.Point(0,0), new google.maps.Point(12,32)); var customIcons = { […]

如何删除默认标记?

我正在使用Google Map API V3,而且我注意到这里有很多标记,尽pipe我不需要它们。 例如,一些学校或其他地方InfoWindows出现时,点击它们。 有什么办法,我可以删除它们,或只是不可能的?

带有Infowindows的Google Maps API多个标记

我试图添加多个标记,每个都有自己的infowindow,点击时出现。 我在获取infowindows时遇到了麻烦,当我尝试它时,只显示一个标记而没有infowindow。 谢谢,让我知道如果你需要更多的信息 <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyB1tbIAqN0XqcgTR1-FxYoVTVq6Is6lD98&sensor=false"> </script> <script type="text/javascript"> var locations = [ ['loan 1', 33.890542, 151.274856, 'address 1'], ['loan 2', 33.923036, 151.259052, 'address 2'], ['loan 3', 34.028249, 151.157507, […]

先closuresInfoWindow再打开另一个

大家晚上好,我写信是因为InfoWindow有问题。 我有一个通过JSON检索数据的ajax函数,但是当打开另一个时,我无法自动closuresInfoWindow。 我的代码是这样的: var mapOptions = { center: new google.maps.LatLng(44.49423583832911, 11.346244544982937), zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("mappa_locali"),mapOptions); $.ajax({ type:'GET', url:"locali_json.php"+urlz, success:function(data){ var json = JSON.parse(data); for (var i=0; i<json.length; i++) { point = new google.maps.LatLng(json[i].latitudine,json[i].longitudine); var infowindow = new google.maps.InfoWindow; infowindow.setContent('<a href="./dettaglioLocale.php?id_loc='+json[i].id_locale+'">'+json[i].nome_locale+'</a><br>'+json[i].address); addMarkerz(point,infowindow); } } }) } function addMarkerz(point,infowindow) { position: point, […]

在添加标记Google Maps v2 Android时自动打开InfoWindow

添加标记时,是否有办法自动打开infowindow? 使用此代码添加标记,但infowindow仅在单击标记时打开: myMap.addMarker(new MarkerOptions() .position(latLng) .title("Title") .snippet("Snippet") .icon(BitmapDescriptorFactory .fromResource(R.drawable.marker)));

Maps V2 InfoWindow中的dynamic内容

我想在Maps V2片段中的标记上显示InfoWindow。 事情是,我想要显示通过图像下载器从网页上dynamic加载的BitMaps。 这是我的InfoWindowAdapter: class MyInfoWindowAdapter implements InfoWindowAdapter { private final View v; MyInfoWindowAdapter() { v = getLayoutInflater().inflate(R.layout.infowindow_map, null); } @Override public View getInfoContents(Marker marker) { Item i = items.get(marker.getId()); TextView tv1 = (TextView) v.findViewById(R.id.textView1); ImageView iv = (ImageView) v.findViewById(R.id.imageView1); tv1.setText(i.getTitle()); DisplayImageOptions options = new DisplayImageOptions.Builder() .delayBeforeLoading(5000).build(); imageLoader.getMemoryCache(); imageLoader.displayImage(i.getThumbnailUrl(), iv, options, new ImageLoadingListener() { @Override […]

自定义信息窗口适配器与地图v2中的自定义数据

我想在android中的地图v2中制作自定义信息窗口适配器,如下所示。 我看到下面的链接,但没有得到更多。 1,2,3 , 下面是我的内容布局文件。 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ImageView android:id="@+id/infocontent_iv_image" android:layout_width="150dp" android:layout_height="150dp" android:layout_alignParentTop="true" /> <RelativeLayout android:id="@+id/infocontent_rl_middle" android:layout_below="@id/infocontent_iv_image" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" > </RelativeLayout> <TextView android:id="@+id/infocontent_tv_name" android:layout_below="@id/infocontent_rl_middle" android:layout_width="match_parent" android:layout_height="wrap_content" android:textStyle="bold" android:layout_margin="5dp" /> <TextView android:id="@+id/infocontent_tv_type" android:layout_below="@id/infocontent_tv_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="#CCCCCC" android:layout_margin="5dp" /> <TextView android:id="@+id/infocontent_tv_desc" android:layout_below="@id/infocontent_tv_type" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" /> <TextView android:id="@+id/infocontent_tv_addr" android:layout_below="@id/infocontent_tv_desc" android:layout_width="match_parent" […]

Google Maps Android API v2 – 交互式InfoWindow(就像在原来的android谷歌地图)

我试图通过新的Google Maps API v2单击标记后创build自定义InfoWindow 。 我希望它看起来像在谷歌的原始地图应用程序。 喜欢这个: 当我有ImageButton里面,它不工作 – 整个InfoWindow被选中,而不仅仅是ImageButton 。 我读到,这是因为没有一个View本身,但它是快照,所以单个项目不能相互区分。 编辑:在文档 (感谢迪斯科S2 ): 正如前面的信息窗口部分所述,信息窗口不是实时视图,而是视图呈现为地图上的图像。 因此,您在视图上设置的任何监听器都将被忽略,并且无法区分视图各个部分的点击事件。 build议您不要在您的自定义信息窗口中放置交互式组件(如button,checkbox或文本input)。 但是,如果Google使用它,必须有一些方法来实现它。 有没有人有任何想法?