beyonk-group / svelte-mapbox

MapBox Map and Autocomplete components for Svelte (or Vanilla JS)
MIT License
342 stars 62 forks source link

Simplify the basic README example. #88

Closed rasben closed 9 months ago

rasben commented 1 year ago

I'm quite new with TS and Svelte, and I had a lot of trouble getting this package to work.

The 'basic example' in the README was confusing for me, so I suggest that it gets updated to be much simpler, and then we link to the official mapbox-gl documentation.

brendanmatkin commented 1 year ago

It might be nice to have both? Do the basic example, then a complete example (since all of the below are svelte components mostly unique to this library, and therefore not in the official documentation).

  <Earthquakes /> // Any custom component you create or want here - see marker example
  <Marker lat={someLat} lng={someLng} color="rgb(255,255,255)" label="some marker label" popupClassName="class-name" /> // built in Marker component
  <NavigationControl />
  <GeolocateControl options={{ some: 'control-option' }} on:eventname={eventHandler} />
  <ScaleControl />