Gabotronix
1 month ago
159
0
General

Vue: Grab south/west and north/east lat-lng from polyline grid in google maps

Posted 1 month ago by Gabotronix

Hi everybody, I have a code which draws a grid using polylines in a map, you can check code bellow. What I want to do is grab all grid cells' south/west and north/east latitude and longitude pair into an array, see image bellow:

https://i.imgur.com/6seWdli.png

I want to store each pair inside an array like this:

[
    [ { lat:44.648490, lng:44.774844 }, { lat:46.648490, lng:46.774844 } ],
    [ { lat:44.648490, lng:44.774844 }, { lat:46.648490, lng:46.774844 } ],
    
    ...


]

My code: http://jsfiddle.net/geocodezip/8z38L0o0/1/

Please sign in or create an account to participate in this conversation.