fawmi / vue-google-maps

Reactive Vue 3 components for Google maps
https://vue-map.netlify.app
MIT License
194 stars 99 forks source link

TypeScript support #19

Open robertjf opened 3 years ago

robertjf commented 3 years ago

Simply put, it would be great if this library supported TypeScript typings since VueJs3 is a TypeScript first class citizen...

fawmi commented 3 years ago

Typescript support is definitely in pipeline. I will at least provide type definitions in the next releases.

Khel commented 3 years ago

As of today, is it possible to make it work with TS?

fawmi commented 3 years ago

Typescript should work normally. We are talking about adding Type Definitions or even rewriting components with Typescript.

fawmi commented 2 years ago

So, for Typescript user. A new major update will be released soon, written completely in Typescript and utilising many of Vue 3 new features.

Foetus6907 commented 2 years ago

I need for a real prod project to implement GoogleMap, I would love to be able to use your library, but i need TypeScript Support as my project is in Typescript. Could you please tell me when do you thing the release with TS support will be ?

mafaqahmed commented 10 months ago

Any update on typescript support? Actually I am using typescript in my project where I want to give type of mapRef

    <GMapMap
      v-if="isDataFetched"
      :center="{lat: 40, lng: -100}"
      :zoom="5"
      disable-default-u-i
      style="height: 90vh;"
      ref="mapRef"
      :options="{
        maxZoom: 22,
        restriction: {
          latLngBounds: {
            north: 85,
            south: -85,
            west: -180,
            east: 180
          },
          strictBounds: true
        },
      }"
    >
      <GMapMarker
        :key="index"
        v-for="(m, index) in markerPosition"
        :position="m.position"
        :clickable="true"
        icon="/images/movie_.png"
        @click="clickMarker(m.id)"
      />
    </GMapMap>

how to give type of mapRef while defining it const mapRef = ref();