Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylers dont work anymore #286

Open
SanderBrijer opened this issue Oct 10, 2024 · 0 comments
Open

Stylers dont work anymore #286

SanderBrijer opened this issue Oct 10, 2024 · 0 comments

Comments

@SanderBrijer
Copy link

I recently updated google maps to 0.21.0, afterwards de stylers of the map dont work anymore.

What I tried:

 function getMapOptions() {
      return {
        styles: [
          {
            featureType: 'poi.business',
            stylers: [
              {
                visibility: 'off',
              },
            ],
          },
          {
            featureType: 'poi.government',
            stylers: [
              {
                visibility: 'off',
              },
            ],
          },
          {
            featureType: 'poi.school',
            stylers: [
              {
                visibility: 'off',
              },
            ],
          },
          {
            featureType: 'poi.medical',
            stylers: [
              {
                visibility: 'off',
              },
            ],
          },
          {
            featureType: 'poi.place_of_worship',
            stylers: [
              {
                visibility: 'off',
              },
            ],
          },
        ],
      };
    }

    watch(
      () => googleMap.value?.ready,
      (ready) => {
        if (!ready) return;

        googleMap.value.map.setOptions(getMapOptions());
      }
    );

and

 <google-map
      v-if="mapHeight"
      ref="googleMap"
      mapId="googleMap"
      style="width: 100%; height: 100%"
      :styles="mapstyles"
 mapstyles() {
      return [
        ...(this.layer?.labels?.companies === false
          ? [...this.styleRemoveLabels]
          : []),
        ...(this.darkmode.value ?? useQuasar()?.dark.isActive
          ? [...this.styles]
          : []),
      ];
    },

Darkmode is not working after the update, and the remove labels (POI companies) dont work anymore...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant