当前位置: 动力学知识库 > 问答 > 编程问答 >

google maps - add new class to marker

问题描述:

I'd like to add a new class to the marker to be able to customise manually each marker. Here are more details about what exactly I'm trying to do:

For a hotel, I'd like to add a marker for the hotel with a different css style to see the difference from the other markers. Then, I'd like to add few markers of good places around.

As you know, the render source code looks like:

<div class="gmnoprint" style="width: 20px; height: 34px; overflow: hidden; position: absolute; opacity: 0.01; cursor: pointer; left: 143px; top: 132px; z-index: 161;"">

If I can add a ordered list css style (class="gmnoprint view1", class="gmnoprint view2", etc), it could be great...

Any idea how I can do that?

i want to change google map's html ,demo like this.

网友答案:

You can add your own class names if you create your own marker that extends the Google Maps Overlay.

Refer to this question on how do do that: Pie Chart on Google map

分享给朋友:
您可能感兴趣的文章:
随机阅读: