Now, its damn slow, I have approx, 440 complex polygon to draw but
this GeoJSON method is too slow, I think I'll go back with GeoRSS and
KML options. Just to make sure, what is appropriate way? considering I
need polygon styling based on data from database. Please guide. thanks

On Jan 7, 1:06 pm, "[email protected]" <[email protected]>
wrote:
> On Jan 7, 3:07 am, SSA <[email protected]> wrote:
>
> > Guys, using EPSG:4289 (its also ) did the job. I got different
> > coordinates and got the polygon with formatting, thanks for looking
> > into the post
>
> > EPSG:28992 is also for Holland but I don't get why it didn't
> > work. Need to get for insight on this SRS thing.
>
> The Google Maps API requires latitude and longitude coordinates in the
> WGS84 coordinate system by 
> default.http://code.google.com/apis/maps/documentation/javascript/maptypes.ht...
>
>   -- Larry
>
>
>
>
>
>
>
>
>
> > On Jan 6, 10:47 pm, SSA <[email protected]> wrote:
>
> > > Thanks again for your inputs. I'll check for V2 and V3 syntaxand will
> > > try create a demo page somewhere but after lots of hit and trial, I
> > > was on the assumption as you pointed Larry, that its could be a data
> > > problem or say coordinates problem.
>
> > > For more info, I used shape file and imported them to Postgres and
> > > SqlServer database then i use GeoServer to fetch GeoRSS, KML and place
> > > them on map, thats done, working fine, got SLD to present them nicely
> > > but GeoRSS does not give styling (and as per the google maps API, I
> > > don't get individual feature and all the events over them) and KML
> > > lacks in performance so tried using GeoJSON as it would also comply
> > > with some sort of heatmaps implementation for the functionality I want
> > > to achive and can give me more control over it. Of-course I am new in
> > > this things so most of the things I read and try, Please correct me,
> > > if I am getting it wrong somewhere.
>
> > > TheSRS I used for import EPSG:28992 or same for working directly over
> > > shape files, I think I have to force WGS84 on geoserver as per your
> > > guidance, don't know, whether it will work or not  but I'll check for
> > > it. Please let me know if I am going in right direction and thanks
> > > again.
>
> > > On Jan 6, 6:28 pm, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > On Jan 6, 6:16 am, SSA <[email protected]> wrote:
>
> > > > > thank you all. here is the complete page, I can not create a demo
> > > > > page.
>
> > > > >http://pastebin.com/NCzg1rW9
>
> > > > > or here, (api key will be different):
>
> > > > >         var Holland = new google.maps.LatLng(52.156, 5.387);
>
> > > > [255000, 591200], [254800, 591100],
> > > > What coordinate system are these points in?  They don't look like
> > > > WGS84 to me.
>
> > > > >         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]]]] }
>
> > > > >         var Options = {
> > > > >             zoom: 8,
> > > > >             center: Holland,
> > > > >             mapTypeId: google.maps.MapTypeId.ROADMAP,
> > > > >             streetViewControl: true,
> > > > >             scaleControl: true,
> > > > >             navigationControl: true
> > > > >         };
>
> > > > >         function Init() {
> > > > >             if (!GBrowserIsCompatible()) return;
>
> > > > >             /*Get the google map object, based on options*/
>
> > > > >             GoogleMap = new
> > > > > google.maps.Map(document.getElementById("map"), Options);
>
> > > > >             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
> > > > >             });
>
> > > > >             polygon.setMap(GoogleMap);
> > > > >         }
> > > > >     </script>
>
> > > > >     <title></title>
> > > > > </head>
> > > > > <body onload="Init()">
> > > > >     <div id="map" class="map">
> > > > >     </div>
> > > > > </body>
> > > > > </html>
>
> > > > > On Jan 6, 2:47 pm, "[email protected]" <[email protected]>
> > > > > wrote:
>
> > > > > > On Jan 6, 5:31 am, SSA <[email protected]> wrote:
>
> > > > > > > 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.
>
> > > > > > A link to your map that exhibits the problem would be useful if you
> > > > > > want 
> > > > > > help.http://groups.google.com/group/google-maps-js-api-v3/t/2b3f101fd509919e
>
> > > > > >   -- Larry
>
> > > > > > > Thanks in advance for your time.
>
> > > > > > > Regards,
> > > > > > > SSA- Hide quoted text -
>
> > > > > - Show quoted text -

-- 
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