Basit
Basit

Reputation: 1840

How to draw Google Maps circle overlays with fixed radius?

I'm using Google Maps API v3 to draw circle overlays at specific locations (latitude and longitude) provided by user via text field (simple HTML and JavaScript). The problem is, when I input different latitudes and longitudes, the size of the overlay circle changes. Even though I've provided a fixed-radius for the circles. I don't know how to fix this problem. I've tried using "scale" instead of "radius" but was unable to do so.

Upvotes: 2

Views: 7888

Answers (1)

geocodezip
geocodezip

Reputation: 161324

Due to the projection used by the google maps API the same radius will appear different sizes at different latitudes. Do you need a fixed radius or a fixed size in pixels? They are not the same.

For a fixed pixel size circle see the answer here (from the "Related" questions on the right)

Upvotes: 1

Related Questions