AlexLavoie42 / Nuxt-Mapbox

Elegant Mapbox integration with Nuxt
81 stars 11 forks source link

Add MapboxGeocoder to module #24

Closed agracia-foticos closed 1 year ago

agracia-foticos commented 1 year ago

Add MapboxGeocoder to module

AlexLavoie42 commented 1 year ago

Already included

agracia-foticos commented 1 year ago

There isnt an example in the documentation https://github.com/AlexLavoie42/Nuxt-Mapbox

Can you give me an example?

AlexLavoie42 commented 1 year ago

Add it the same way the rest of the controls are added.

    <MapboxMap>
      <MapboxLayer
        source-id="{ID}"
        :source="{
          type: 'geojson',
          data: '/test.geojson'
        }"
        :layer="{
          source: '{ID}',
          id: 'geojson-layer',
          type: 'fill'
        }"
      />
      <MapboxGeocoder />
    </MapboxMap>
agracia-foticos commented 1 year ago

Add it the same way the rest of the controls are added.

    <MapboxMap>
      <MapboxLayer
        source-id="{ID}"
        :source="{
          type: 'geojson',
          data: '/test.geojson'
        }"
        :layer="{
          source: '{ID}',
          id: 'geojson-layer',
          type: 'fill'
        }"
      />
      <MapboxGeocoder />
    </MapboxMap>

But i need Mapboxgeocoder without MapboxMap

image

I need this example https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder-no-map/

agracia-foticos commented 1 year ago

@AlexLavoie42 we can use MapboxGeocoder without mapbox like this example?? https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder-no-map/

AlexLavoie42 commented 1 year ago

It is being added when I release the next update with CustomGeocoder

You can demo it now on v1.3.5-dev.1

AlexLavoie42 commented 1 year ago

Added in #28