Angular-google-maps infowindow / tooltip when hovering over marker

I am relatively new to angular.

I use angular -google-maps and I can’t figure out how to get the / infowindow tooltip to display when you hover over the marker: basically what you get when you use direct google maps api and set the 'title' attribute of the marker object (as in https://developers.google.com/maps/documentation/javascript/examples/marker-simple )

I tried the markers element with the labelContnent attribute, and the marker with the marker label element also does not show a tooltip with the name of the marker.

The demo version of angular -google-maps ( http://angular-google-maps.org/demo ) also doesn’t display tooltips, so I don’t think I'm doing something wrong.

The question is, how do I get the title to display?

TIA!

+4
source share
1 answer

When creating markers, you need to provide an element optionscontaining title.

Sorry, I don’t have a small working example, but you want your marker object to look something like this:

var marker = {
    coords: { latitude: 38.8977, longitude: -77.0366 },
    icon: 'images/whitehouse.png',
    options: { title: 'The White House' }
    id: 12345
};

and then specify all of these property names in the <marker>or directive <markers>.

, . , , , , , .

, , mouseover mouseout. ( 2014 ) , , <marker>, <markers>.

+4

Source: https://habr.com/ru/post/1534353/


All Articles