Skip to content

Instantly share code, notes, and snippets.

@alex3165
Created May 4, 2016 21:55
Show Gist options
  • Save alex3165/2501951d6bb1d977a4dfcb7378b97e1c to your computer and use it in GitHub Desktop.
Save alex3165/2501951d6bb1d977a4dfcb7378b97e1c to your computer and use it in GitHub Desktop.
<ReactMapboxGl
style={style}
center={this.state.center}
zoom={this.state.zoom}
accessToken={accessToken}
onDrag={this._onDrag}
containerStyle={containerStyle}>
<ZoomControl
zoomDiff={1}
onControlClick={this._onControlClick}/>
<Layer
type="symbol"
id="marker"
layout={{ "icon-image": "marker-15" }}>
{
stations
.map((station, index) => (
<Feature
key={station.get("id")}
onClick={this._markerClick.bind(this, station)}
coordinates={station.get("position")}/>
)).toArray()
}
</Layer>
</ReactMapboxGl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment