i want to draw circle around my current location excatly 1 kilometers readius
hi friends i want to draw circle around my current location exactly 1 kilometer radius so wat can i do.....i able to draw circle but how to开发者_Go百科 put radius so it becomes exactly one kilometer..
At a high level:
- Get the bounding coordinates of your current map view.
- Use your coordinates to compute the distance either horizontally or vertically across your map. Convert your distance to meters, if necessary.
- Divide your distance in meters by the horizontal or vertical resolution (in pixels) of your map view. This gives you the number of meters per pixel at your current zoom level.
- Evaluate
1000 / <meters per pixel>
to determine the number of pixels in 1 kilometer at the current zoom level. This is the radius of your circle. - Draw your circle using the radius you got in step 4.
精彩评论