diegoazh / gmap-vue

A wrapper component for consuming Google Maps API built on top of Vue. Fork of the popular vue-google-maps plugin.
https://diegoazh.github.io/gmap-vue/
173 stars 51 forks source link

Do we have the option to rotate the PNG marker? #313

Closed Anjgpt closed 6 months ago

Anjgpt commented 7 months ago
          @diegoazh Do we have the option to rotate the PNG marker?

As I'm not able to do this with the below approaches.

"gmap-vue": "^3.5.2",

<gmap-marker
        v-for="m, index in markers"
        :position="m.position"
        :icon="{
          url: 'https://developers.google.com/maps/documentation/javascript/examples/full/images/info-i_maps.png',
          rotation: 90,
        }"
        :key="index"
      />

Or

Using style transform also not working.

<gmap-marker
        v-for="m, index in markers"
        :position="m.position"
        :icon="{
          url: 'https://developers.google.com/maps/documentation/javascript/examples/full/images/info-i_maps.png',
        }"
        :style="{ transform: 'rotate(90deg)' }"
        :key="index"
      />

If I'm doing this with SVG image it's working but there is slowness as I've lot's of markers.

Originally posted by @Anjgpt in https://github.com/diegoazh/gmap-vue/issues/135#issuecomment-2022353456

diegoazh commented 7 months ago

could you test our new version v2.0.0? also, you can find the main points on our new documentation site, on the other hand, in this new version we are using the new AdvancedMarkerElement, I think with the new improvement you could do the rotation.

create-issue-branch[bot] commented 7 months ago

Branch issue-313-Do_we_have_the_option_to_rotate_the_PNG_marker created!

Anjgpt commented 7 months ago

@diegoazh This new version you are referring v2.0.0 is for Vue 3 project? Will that work with Vue 2 project?

diegoazh commented 7 months ago

No, it won't. But, I didn't try. The version of this plugin for Vue 2 is no longer maintained because the EOL of Vue 2.

Anjgpt commented 7 months ago

I've found the solution for this here I'm able to plot ~2 lakh customized markers smoothly.

diegoazh commented 6 months ago

I'm going to close this issue but, feel free to re-open it if something new happens.