Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
asennikov committed Nov 17, 2015
1 parent ce7226c commit e3b5b74
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ with the main `g-map` component.

## Map with Info Windows

Those Info Windows will be open right after component is rendered
These Info Windows will be open right after component is rendered
and will be closed forever after user closes them. You can specify
optional `onClose` action to tear down anything you need when Info Window
has been closed by user.
Expand Down Expand Up @@ -117,6 +117,38 @@ in block form and set context of Info Window to the one provided by Marker.
{{/g-map}}
```

## Grouped Markers with Info Windows

Additionally you can specify parameter `group` which ensures that only
one Info Window is open at each moment for Markers of each group.

```handlebars
{{#g-map lat=37.7833 lng=-122.4167 zoom=12 as |context|}}
{{#g-map-marker context group="cats" lat=37.7833 lng=-122.4167 as |markerContext|}}
{{#g-map-infowindow markerContext}}
<h2>Cat #1</h2>
{{/g-map-infowindow}}
{{/g-map-marker}}
{{#g-map-marker context group="cats" lat=37.7433 lng=-122.4467 as |markerContext|}}
{{#g-map-infowindow markerContext}}
<h2>Cat #2</h2>
{{/g-map-infowindow}}
{{/g-map-marker}}
{{#g-map-marker context group="dogs" lat=37.7533 lng=-122.4167 as |markerContext|}}
{{#g-map-infowindow markerContext}}
<h2>Dog #1</h2>
{{/g-map-infowindow}}
{{/g-map-marker}}
{{#g-map-marker context group="dogs" lat=37.7733 lng=-122.4467 as |markerContext|}}
{{#g-map-infowindow markerContext}}
<h2>Dog #2</h2>
{{/g-map-infowindow}}
{{/g-map-marker}}
{{/g-map}}
```

## Map with route between 2 locations

Using Google Maps [Directions](https://developers.google.com/maps/documentation/javascript/directions) service.
Expand Down

0 comments on commit e3b5b74

Please sign in to comment.