agm-overlays
agm-overlays copied to clipboard
Style InfoWindow
Hello, Can I style infowindow like this ? Please help!
agm-overlays allows for custom html
In my code, I just use an absolute positioned element that is revealed on click. I do not use the InfoWindow of agm-core. I do not use the snazzy window that I've seen other people use as an option in agm-core. I just trust in my own html abilities to write my own floating element.
Good luck to you. TIP: I typically have an element with position:relative
and then inside that element I have a position:absolute
element with like a top:0
or bottom:0
to make my floating element appear above or below my marker.
thank you! Can I style agm ? for example <agm-overlay [ngStyle]="{'z-index':i===activeId ? '200': 'auto'}> or add class ?
No
And with that question, I feel you don’t understand
Your html code, including your hide/show floating window, would go inside an agm-overlay tag
The demo code for this package has something of the sorts. Perhaps tomorrow I could dig you up an example
I did it by html and css! Thank you!
Do I need use fitbounds method with cluster or cluster make all what I need? (I get coords array from api) Please help!
I use clustering a lot in my production code, however it’s been a little time since my last use and it’s a lazy Sunday...
For now,
Here is a link to the demo code that uses clustering (overlay tags seem to have a bounds attr): https://github.com/AckerApple/agm-overlays/blob/master/example/src/app.template.ts#L27
If you continue to have issues, I’ll look up my production usages for you
Sorry! I know about bound attribute in agm overlay, before when I use agm-core only , I made fitbounds for example : let bounds: google.maps.LatLngBounds = new google.maps.LatLngBounds(); bounds.extend(new google.maps.LatLng(this.location.lat, this.location.lng)); this.objMap.fitBounds(bounds); So , I don't know how right use it, like before or calculate bound for your attr( I haven't found formula)
Please help!
I can't. I'm busy. I tried typing this message out several times, I can't figure out what to communicate nor what to ask.
With a name like "newprogrammer" and my names not "greatteacher", I can't with you