kdweber89
kdweber89

Reputation: 2174

Styling the google maps api window

I did some changes to our app within the map by switching out our normal generic icons, to smaller icons (that look quite nice). However my new icons aren't as tall as my old ones, and so when I select a new icon, the window that I have associated with it is sitting too high.

I'm having a tough time styling my window so that it rests lower towards the icon.

(see image)

I'm using the angular, and trying to find something in these docs. http://angular-ui.github.io/angular-google-maps/#!/api/window

my code looks like

%ui-gmap-window{ show: '$ctrl.selectedLocation', coords: "$ctrl.selectedLocation", options: '$ctrl.windowOptions', closeClick: '$ctrl.closeClick()' }

And thats all I really need to show as it selects the location that I need and then displays the window.

Is there a way to style that at all?

see the gap, trying to get that resting on top

Upvotes: 0

Views: 75

Answers (1)

gforce301
gforce301

Reputation: 2984

If we read the API docs starting with the link you gave: http://angular-ui.github.io/angular-google-maps/#!/api/window we see the options parameter. It's description:

Additional options to pass to the InfoWindow. See InfoWindowOptions.

If we follow that link we find an option called pixelOffset. It's description:

Type: Size

The offset, in pixels, of the tip of the info window from the point on the map at whose geographical coordinates the info window is anchored. If an InfoWindow is opened with an anchor, the pixelOffset will be calculated from the anchor's anchorPoint property.

So the answer to your question is: yes, if we read the docs.

Upvotes: 1

Related Questions