[OpenLayers-Dev] Patrch for getting vector drawing working over the 180 line going.

Phil Scadden p.scadden at gns.cri.nz
Mon Aug 16 01:05:44 EDT 2010


Okay, I have worked away at doing this in the renderer (drawfeature). I 
have hit another problem with this approach.  Suppose you have 180 line 
down the middle. Draw an object on the right hand side. 
geometry.getBounds returns bounds in terms of negative no. (the 
underlying longs are negative going into the projection). However the 
extent of the viewport, (used in  if 
(!bounds.intersectsBounds(this.extent)) ) has the right hand side in 
positive coordinates. The net result is that nothing is visible until 
you add a point on the left hand side of the date line and suddenly all 
is visible.

Now - should I fix intersectBounds to handle a much more complicated 
case and then get bounds in same coord. Or should I convert the bounds 
to consistant coordinates first (my choice)? I am still not sure that 
doing this in the renderer rather than in path.js, polyon.js is the 
right thing. I also have to modify the measure controls which dont 
handle coordinates jumping from positive to negative and back very well.

-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.




More information about the Dev mailing list