admin管理员组文章数量:1404615
so, i'm working on a project that uses maps a lot, and a job was passed to me, I have to make all this google maps Markers.
And put NUMBERS MANUALLY:
I asked if its possible to put the numbers by code, they say that is not, this need to be done this way.
So, i need to know, there is a way of changing this numbers by javascript or css or anything that could automatize this process.
so, i'm working on a project that uses maps a lot, and a job was passed to me, I have to make all this google maps Markers.
And put NUMBERS MANUALLY:
I asked if its possible to put the numbers by code, they say that is not, this need to be done this way.
So, i need to know, there is a way of changing this numbers by javascript or css or anything that could automatize this process.
Share Improve this question edited Nov 5, 2015 at 14:40 geocodezip 161k14 gold badges226 silver badges254 bronze badges asked Nov 5, 2015 at 11:27 Raphael MayconRaphael Maycon 732 silver badges9 bronze badges1 Answer
Reset to default 7It is indeed very possible - simply use the label
attribute :
var marker = new google.maps.Marker({
position: new google.maps.LatLng(56.43, 10.3),
map: map,
label: '6' //<-- 6 will be the text inside the marker
});
demo with different numbers -> http://jsfiddle/ec2cr0jw/
But you can only add labels with one character, so your range of numbers is limited to 0..9. If you want more plex text or longer numbers in the markers, you can create the markers yourself from scratch, like in the answer to this question -> How to add values in google map v3
本文标签: javascriptGoogle Maps Markers with numbersStack Overflow
版权声明:本文标题:javascript - Google Maps Markers with numbers - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744835386a2627601.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论