0
我发现了一个脚本,可以在Google地图中创建标记。标记从数据库中加载。脚本的一部分是如下:谷歌地图中的标记图像取决于列值
//Load Markers from the XML File, Check (map_process.php)
$.get("map_process.php", function (data) {
$(data).find("marker").each(function() {
var name = $(this).attr('name');
var address = '<p>'+ $(this).attr('address') +'</p>';
var type = $(this).attr('type');
var door = $(this).attr('door');
var point = new google.maps.LatLng(parseFloat($(this).attr('lat')),parseFloat($(this).attr('lng')));
create_marker(point, name, address, false, false, false, "http://www.example.com/marker/icons/A.png");
});
});
我使人们有可能通过创建一个标记选择3“类型”,例如,A,B和C中的所有标记现在由A.png显示。我想知道是否可以根据类型制作标记图像。如果type是A,比A.png,如果B,比B.png,如果type是C,比C.png。
有人可以帮助我吗?
妈的,这么容易的
create_marker
!谢谢! – Robinho 2015-03-31 19:28:36