Google Fusion Tables With Maps - Link Table field to Map Info Window

这一生的挚爱 提交于 2019-12-02 10:22:50

Once the user clicks on the company name, you can create a new InfoWindow object manually. Then set it's position and content and finally put it on the map:

 var map = new google.maps.Map(document.getElementById('map-canvas');
 var infoWindow = new google.maps.InfoWindow();
 var coordinates = new google.maps.LatLng(37.5, -122.1);
 infoWindow.setPosition(coordinates);
 infoWindow.setContent('Company/Facility XY');
 infoWindow.open(map);

There is an InfoWindow example from Google, that even uses geocoding and a spatial query to get the closest hit from the database.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!