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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744835387a4596233.html
评论列表(0条)