Re: getBoundsZoomLevel using bounds is not working

2008-09-25 Thread Sudhindra HS
Thank you for the suggestion.

But the Google maps performance is very slow while dealing with large amount
of data.

Hence we moved to open layers implementation.


On Wed, Sep 24, 2008 at 11:43 PM, Eric Ayers [EMAIL PROTECTED] wrote:


 0) We released an updated gwt-maps library yesterday.  If you use it,
 your calls to new LatLng() would need to change to
 LatLng.newInstance().
 1) How is zoom not set correctly?  What behavior to you expect and
 what do you see?  You shouldn't expect the polygon to fit exactly
 inside the bounds, because the zoom levels are discrete and not
 dynamically sized.
 2) I looked through the code for setCenter(LatLng, int) and it seems
 to delegate to the Maps API correctly.  Out of curiousity, have you
 tried using a separate mapWidget.setZoomLevel(); call?

 On Sep 23, 9:29 am, neversaydie [EMAIL PROTECTED] wrote:
  Hello,
 
  I have a set of lat longs say 200.
  I construct a polygon out of these points. When i render this polygon
  the, zoom level is not set correctly set for some reasons.
 
  Can anybody help me why this is happeneing?
 
  Here is my code
 
 LatLng[] points = new LatLng[coordinates.size()];
  LatLngBounds bounds = new LatLngBounds();
 
  int index = 0;
  for ( Coordinate coordinate : coordinates ) {
  points[index] = new LatLng( coordinate.getLatitude(),
  coordinate.getLogitude() );
  bounds = bounds.extend( points[index] );
  index++;
  }
  Polygon polygon = new Polygon( points, color, 10, 0.0, color,
  0.7 );
 
  mapWidget.clearOverlays();
  mapWidget.addOverlay( polygon );
 
  mapWidget.setCenter( bounds.getCenter(),mapWidget.getBoundsZoomLevel(
 bounds ));
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: getBoundsZoomLevel using bounds is not working

2008-09-24 Thread Eric Ayers

0) We released an updated gwt-maps library yesterday.  If you use it,
your calls to new LatLng() would need to change to
LatLng.newInstance().
1) How is zoom not set correctly?  What behavior to you expect and
what do you see?  You shouldn't expect the polygon to fit exactly
inside the bounds, because the zoom levels are discrete and not
dynamically sized.
2) I looked through the code for setCenter(LatLng, int) and it seems
to delegate to the Maps API correctly.  Out of curiousity, have you
tried using a separate mapWidget.setZoomLevel(); call?

On Sep 23, 9:29 am, neversaydie [EMAIL PROTECTED] wrote:
 Hello,

 I have a set of lat longs say 200.
 I construct a polygon out of these points. When i render this polygon
 the, zoom level is not set correctly set for some reasons.

 Can anybody help me why this is happeneing?

 Here is my code

        LatLng[] points = new LatLng[coordinates.size()];
         LatLngBounds bounds = new LatLngBounds();

         int index = 0;
         for ( Coordinate coordinate : coordinates ) {
             points[index] = new LatLng( coordinate.getLatitude(),
 coordinate.getLogitude() );
             bounds = bounds.extend( points[index] );
             index++;
         }
         Polygon polygon = new Polygon( points, color, 10, 0.0, color,
 0.7 );

         mapWidget.clearOverlays();
         mapWidget.addOverlay( polygon );

 mapWidget.setCenter( bounds.getCenter(),mapWidget.getBoundsZoomLevel( bounds 
 ));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---