Closed RosanaRufer closed 8 years ago
It doesn't look like there's any way to do that with the standard Google maps library, but that would be a useful feature. I'll try to add that over the next day or two. Thanks!
Hey,
I just added a textLabel directive. It renders text centered at a given pair of coordinates. You can also set the directive's class and the text will inherit that class. Give it a shot and let me know if there are any issues. I'll test it more and add documentation later. For now:
In the controller:
$scope.text = {
features: [
{ text: "text1", coords: [39, -121] },
{ text: "text2", coords: [39.5, -121] }
],
visible: true,
events: {
click: function(event, feature, map, features) {
// Whatever
}
}
};
In the HTML:
<text-labels features="text.features" events="text.events" class="text-label"></text-labels>
Then style .text-label however you want in CSS. Currently the directive only has those three attributes, features, visible, and events.
Here's a screenshot:
You rock :metal: I'm now trying it out
It works perfectly, thank you so much, this issue can be closed.
Awesome! Thanks for bringing that to my attention :)
I need something like this![image](https://cloud.githubusercontent.com/assets/4906291/11564994/4b57adb6-99dc-11e5-9919-2f717453aafa.png)