Getting “Cannot call a class as a function” in my React Project

I’m trying to add a React map component to my project but run into an error. I’m using Fullstack React’s blog post as a reference. I tracked down where the error gets thrown in google_map.js line 83: Here is my map component so far. The page loads just fine (without a map) when I comment … Read more

Google Maps JS API v3 – Simple Multiple Marker Example

This is the simplest I could reduce it to: 👨‍💻 Edit/fork on a Codepen → SCREENSHOT There is some closure magic happening when passing the callback argument to the addListener method. This can be quite a tricky topic if you are not familiar with how closures work. I would suggest checking out the following Mozilla … Read more

Google Maps API DeletedApiProjectMapError

I have found the solution to the problem. You need to enable both the Google Maps Javascript API, and the Geocoding API. https://console.developers.google.com/projectselector/apis/library and https://console.developers.google.com/google/maps-apis/apis/geocoding-backend.googleapis.com Afterwards the error was RefererNotAllowedMapError instead of DeletedApiProjectMapError, but that was because I was running it on localhost – and it worked on the actual site after I added the domain in Credentials -> Domain Verification.

Can not solve: Geocode was not successful for the following reason: OVER_QUERY_LIMIT

Thanks xomena, I have solved it. For those who are having the same problem, here is the solution: My error was the position of sleep() function and the way it acts. Here is a new small problem: as it adds new markers the map starts tilting, shifting, zooming and trilling so the user experience is terrible. But … Read more

How can I change the color of a Google Maps marker?

Since maps v2 is deprecated, you are probably interested in v3 maps: https://developers.google.com/maps/documentation/javascript/markers#simple_icons For v2 maps: http://code.google.com/apis/maps/documentation/overlays.html#Icons_overview You would have one set of logic do all the ‘regular’ pins, and another that does the ‘special’ pin(s) using the new marker defined.