将 CSS 样式标记添加到谷歌地图

问题描述:

有人可以告诉我如何将这个动画标记添加到下面的谷歌地图 API 中.

Can someone please advise how I could add this animated marker to the below google maps API.

以下是标准的谷歌地图 api 代码,可选择为标记(图标)提供图像源.

The below is the standard google maps api code with option to give image source for the marker (icon).

function initialize() {
  var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  var mapOptions = {
    zoom: 4,
    center: myLatlng
  }
  var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

  var marker = new google.maps.Marker({
      position: myLatlng,
      map: map,
      icon: marker.png,         //Option for setting the marker source
      title: 'Hello World!'
  });
}

google.maps.event.addDomListener(window, 'load', initialize);

使用 RichMarker for Google Maps v3 - 用法:

curMarker = new RichMarker({
    position: new google.maps.LatLng(position),
    map: map,
    content: '<div id="foo">Bar</div>'
});

JSFiddle 示例.