Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfoWindow support #150

Closed
sebholstein opened this issue Feb 22, 2016 · 2 comments
Closed

InfoWindow support #150

sebholstein opened this issue Feb 22, 2016 · 2 comments

Comments

@sebholstein
Copy link
Owner

angular2-google-maps should support Info Windows:
https://developers.google.com/maps/documentation/javascript/infowindows
https://developers.google.com/maps/documentation/javascript/3.exp/reference#InfoWindow

As a standalone component:

<sebm-google-map [latitude]="lat" [longitude]="lng">

 <sebm-google-map-info-window [latitude]="lat" [longitude]="lng" (closeClick)="windowClosed()"
    [disableAutoPan]="true" [maxWidth]="120"> 
    <h1>My Content</h1>
  </sebm-google-map-info-window>

</sebm-google-map>

And inside a marker:

<sebm-google-map [latitude]="lat" [longitude]="lng">

  <sebm-google-map-marker  [latitude]="lat" [longitude]="lng">
    <sebm-google-map-info-window> <!-- no need to set lat/lng here - gets lat/lng from the marker -->
      My Content<br />
      can be HTML
    </sebm-google-map-info-window>
  </sebm-google-map-marker>

</sebm-google-map>

Component methods:

<sebm-google-map [latitude]="lat" [longitude]="lng">


  <sebm-google-map-info-window  [latitude]="lat" [longitude]="lng" #window>
    My Content
  </sebm-google-map-info-window>

  <button (click)="window.open()">Open InfoWindow</button>
  <button (click)="window.close()">Close InfoWindow</button>
  <button (click)="window.toggle()">Toggle InfoWindow</button>

</sebm-google-map>
@davidbeijinho
Copy link

+1

@alanfagner
Copy link

Hello friend I am using your Google Maps component and I love it , I wonder when it will be released the version 0.9.0 which contains InfoWindows ?

sebholstein added a commit that referenced this issue Mar 21, 2016
sebholstein added a commit that referenced this issue Mar 22, 2016
sebholstein added a commit that referenced this issue Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants