Google Map is not recognized as a vector map on some browsers

855 views Asked by At

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.

0

There are 0 answers