Discrepancy between Maps JavaScript API and Maps SDK for iOS versus Maps Static API

  Kiến thức lập trình

When drawing a polygon in Google Maps Static API it seems to have been using a different map compared to Maps JavaScript API and Maps SDK for iOS which displays the same map.

Here is the image of the following images of the maps
Google Maps Static API:

Maps JavaScript API:

Maps SDK for iOS:

As shown in the image for Google Maps Static API the polygon is not aligned with the rooftop.
Here is the URL request that I’ve used for Google Maps Static API:

https://maps.googleapis.com/maps/api/staticmap?center=21.3224668420634,-157.843136005104&zoom=20&size=520×720&maptype=hybrid&path=color:0x0000ffff%7Cfillcolor:0x0000ff30%7Cweight:3%7C21.3223843879641,-157.843100130558%7C21.3224518504125,-157.843103818595%7C21.3225086937477,-157.843179926276%7C21.3224765241706,-157.843251340091%7C21.3223843879641,-157.843100130558&key=API_KEY

Is this a map styling issue since it seems that the map used is not the same?

I also trying to simplify the request in Google Maps Static API but the issue still persist.
I also tried adjusting the zoom level if it will change.
Also I actually have a screenshot of the correct implementation in Google Maps Static API which is when I’m trying to figure out the path. See image below:

Also I have an existing tab opened in my browser and when I have refresh it the polygon doesn’t align anymore?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT