draw overlay of equal square boxes

200 views
Skip to first unread message

khaldoon

unread,
Mar 5, 2012, 8:31:08 AM3/5/12
to google-map...@googlegroups.com
Hi,
 Well, My goal is to draw overlay of equal size square boxes. Please see the example below:

Example:
for example i start with lat,lng (80,80), i want to move 5km east and 5km sought and draw box then next box will start from lat, lng (80+5km, 80), similarly so on and so forth. end goal is to draw grid of equal boxes

---------------------------------------------------
|   5kmx5km       |  5kmx5km        |
---------------------------------------------------
|   5kmx5km       |  5kmx5km        |
---------------------------------------------------
Do i need to change map projection in order to do this? or do u have any idea? thanks

geoco...@gmail.com

unread,
Mar 5, 2012, 10:39:28 AM3/5/12
to Google Maps JavaScript API v3
Some examples that may help you:
http://www.geocodezip.com/v3_polygon_example_squares.html
(from before the geometry library was released, there may be better
ways now)

http://www.geocodezip.com/v3_MW_example_eshapes.html

-- Larry

Nianwei Liu

unread,
Mar 6, 2012, 6:08:48 AM3/6/12
to Google Maps JavaScript API v3
> Do i need to change map projection in order to do this? or do u have any
> idea? thanks

That would depends on your goal, some project preserve distance, some
preserve area, some directions. You can use the default Mercator
projection, which preserves north, but not S-N distance. Your square
will not look exactly like "square".
Reply all
Reply to author
Forward
0 new messages