3

I have built and deployed a next.js app that displays a map with the help of @react-google-maps/api . Furthermore, I'm using the Google maps "data driven" API to create a feature layer that displays postal code boundaries.

I've deployed this to Vercel and it works well on some browsers.

But, the problem I'm having is that the "feature layer" is not displayed on some browsers.

On browsers on which the "feature layer" is not displayed, the following error is being printed to the console

google.maps.FeatureLayer.style: The map is not a vector map. That will prevent use of data-driven styling. 

and in full below:

key=***************&v=beta&region=US&map_ids=81e0340ff65abdde&callback=initMap:343 google.maps.FeatureLayer.style: The map is not a vector map. That will prevent use of data-driven styling. 

I've checked the status of my map on the google cloud console and my map is shown as

Name            Map ID             Type

Zipcode Map 81e0340ff65abdde    JavaScript – Vector

The map seems to be a js vector map but still gives this error.

I don't know what else to try and there seems to be little information on this topic. Any help is greatly appreciated.

  • There's a bug on the [issue tracker](https://issuetracker.google.com/issues/246518832) that have the same issue as you. Can you try doing the mentioned solution on the bug of reopening your browser? – Yrll Dec 02 '22 at 00:46
  • Did you choose "Vector" when creating your Map ID in the Cloud console? – MrUpsidown Dec 02 '22 at 08:13
  • One of our devs is running into the same issue. Did you figure it out? – Justin Apr 05 '23 at 16:51

0 Answers0