'How to set a default marker to the location based lat and long in google map received by Google Static API?

I want google map image with default marker like below. enter image description here

But, It is coming naked with marker. Click below link

https://maps.googleapis.com/maps/api/staticmap?center=28.6086154,77.3566754&zoom=14&markers=color:blue&size=500x250&key=AIzaSyBGgk9wdUHO6GvIoHu0w8OJtPIOwq6EGYI

enter image description here

How can I set marker same as previous photo??



Solution 1:[1]

You can set the color of the marker to red, plus add the marker location at the end. Here’s a Static Map API web request for reference:

https://maps.googleapis.com/maps/api/staticmap?center=28.6086154,77.3566754&zoom=14&size=500x250&maptype=roadmap&markers=color:red%7C28.6086154,77.3566754&key=YOUR_API_KEY

More info can be found here:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Beth