【发布时间】:2014-11-18 09:37:05
【问题描述】:
我有这个链接
http://www.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png
在谷歌地图中包含此 使用经纬度指向特定位置,
现在我想添加闪烁边框到上面的标记链接打开..
有没有办法在HTML、CSS、JQuery中将边框闪烁添加到上述标记中,
我上面的链接打开了标记,我已经在jsfiddle完成了
如果可能的话,请提供 jsffidle 中的链接
如何在css和html、jquery和blink中为这个标记添加边框?
这是我在谷歌地图中的代码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 1000px; height: 600px;"></div>
<script type="text/javascript">
var locations = [
['STHOWBGA01_ATIF_RNID_L015',24.31026,93.56268],
['GWTRGOK004_BILF_RNOD_L023',23.70692,91.27397],
['GWTRBLWBN1_BILF_RNOD_L038',24.0179,91.4529],
['SJOWKHL007_ATIF_RNOD_L012',25.35197,92.3723],
['TTINNMSAI4_VIOF_RNID_L011',27.66616,95.87926],
['SIMWUKHRL5_VIOF_RNID_L061',25.12267,94.36558],
['SDIMZLUKI3_BILF_RNOD_L035',25.63658,93.64943]
];
var lat_center = 24.31026,
long_center = 93.56268;
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 10,
center: new google.maps.LatLng(lat_center, long_center),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
var marker, i, text;
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][3], locations[i][2]),
map: map
});
text = locations[i][0];
if(locations[i][4] === lat_center && locations[i][2] === long_center) {
marker.setAnimation(google.maps.Animation.DROP);
marker.setIcon('http://maps.google.com/mapfiles/arrow.png ');
//text += '<br>' + 'Additionl text for centered marker';
}
google.maps.event.addListener(marker, 'mouseover', (function(marker, text) {
return function() {
infowindow.setContent(text);
infowindow.open(map, marker);
}
})(marker, text));
}
</script>
</body>
</html>
我想为 lat_center 和 long_center 绘制,现在在这个
marker.setIcon 在此我必须对 marker.seticon
是否可以在谷歌地图中使用多个标记?
【问题讨论】:
-
您希望所提供图标的黑色边框闪烁吗?
-
是的,请告诉我
-
边框闪烁
-
您需要使用 Photoshop 或类似工具创建一个带有白色边框的版本,然后您可以使用 css 使它们闪烁
-
您能否为我在 jsfiddle 中给出的链接制作带有闪烁边框的链接,或者是否有任何在线编辑器可以为标记添加边框...请告诉我
标签: javascript html css image photoshop