Add CSS styled marker to google maps

前端 未结 4 1247
遇见更好的自我
遇见更好的自我 2020-12-03 18:10

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

The below is the standard google maps api code with option to give imag

4条回答
  •  有刺的猬
    2020-12-03 18:19

    I used RichMarker for this in my Angular2 Ionic3 project.

    let marker = new RichMarker({
      position: new google.maps.LatLng(markerData.lat, markerData.lng),
      map: this.map,
      content: '

    ' + markerData.story.user.nickName + '

    ', shadow: 0 });

    And the trick was how to import the js file. In the src directory I added the js file to the index.html like this:

    
    
    

提交回复
热议问题