Hi All,

I am struggeling with placing a multipolygon over google maps.

GeoJson is:


var GeoJSON = { "type": "MultiPolygon", "coordinates": [[[[255000,
591200], [254800, 591100], [254200, 590900], [254100, 591000],
[253200, 590800], [253200, 591000], [252600, 591000], [252300,
590300], [251716.41127540552, 590300], [251100, 590400], [250900,
591100], [250300, 590800], [250132.08422666547, 591051.8736600018],
[250100, 591100], [249700, 591900], [249900, 592000],
[249401.3619016671, 593097.0038163324], [249600, 593205.9016776244],
[249600, 593700], [249600, 594199.6611783154], [249800, 594300],
[249965.23947141026, 594300], [250100, 594300], [250700, 594400],
[251263.8577608574, 594400], [251300, 594400], [251390.99344587393,
594490.993445874], [251700, 594600], [251700, 594800], [251400,
595500], [251300, 596000], [251400, 596200], [251500, 596400],
[251900, 596400], [252400, 596400], [253500, 596100], [254000,
596200], [254100, 596500], [254000, 596500], [254100, 596700],
[254773.47066302033, 596411.3697158485], [254800, 596000], [254600,
595700], [254603.36775107612, 594579.7934935433], [254696.28726031014,
594022.276438139], [254700, 593200], [254800, 592700],
[254990.02682810242, 592509.9731718976], [255000, 591200]]]] }

and used this function to get polygon:

var coords = GeoJSON.coordinates;
var paths = [];

 for (var i = 0; i < coords.length; i++) {
        for (var j = 0; j < coords[i].length; j++) {
            var path = [];
            for (var k = 0; k < coords[i][j].length; k++) {


                var ll = new google.maps.LatLng(coords[i][j][k][0],
coords[i][j][k][1]);
            path.push(ll);

            }
            paths.push(path);
        }
    }
    var polygon = new google.maps.Polygon({
        paths: paths,
        strokeColor: "#FF7800",
        strokeOpacity: 1,
        strokeWeight: 5,
        fillColor: "#46461F",
        fillOpacity: 0.25,
        map:GoogleMap // also tried setMap on polygon
    });

or
polygon.setMap(GoogleMap);


When I debug the code in firebug, I see lat/long conversion is going
alright but on the maps, there is nothing no errors.

Any help or clue highly is appreciated.

Thanks in advance for your time.

Regards,
SSA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to