问题描述
在我的数据库中我存储纬度和经度值,我不保存该点的地址...
我想显示这些点在谷歌地图。
i从数据库获取纬度,经度和sno并按以下方式进行映射...
var markers = JSON.parse('<%= ConvertDataTabletoString()%>');
in my database i am storing Latitude and Longitude values,i am not saving the address of that point...
I want to show those points in google map.
i am getting latitude ,longitude and sno from database and mapping in the following way...
var markers = JSON.parse('<%=ConvertDataTabletoString()%>');
for (i = 0; i < markers.length; i++) {
var data = markers[i]
var myLatlng = new google.maps.LatLng(data.lat, data.lng);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: data.title
});
(function (marker, data) {
google.maps.event.addListener(marker, "click", function (e) {
infoWindow.setContent(data.title);
infoWindow.open(map, marker);
});
})(marker, data);
}
这里我从数据库获得标题为sno
但我想显示正确的地址如果我点击标记那个标记.....
googlemaps中是否有任何事件或函数来显示标记的地址...
i想要得到正确的地址代替data.title从数据库获取
如果你知道请回复我.....
here i am getting title as sno from database.
But i want to show the correct address of that marker if i click the marker.....
is there any events or functions in googlemaps to show the address of marker...
i want to get correct address in place of data.title which is getting from database
if you know please reply me.....
推荐答案
这篇关于在谷歌地图中获取标记的地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!