[OpenLayers-Trac] Re: [OpenLayers] #2884: Wrong VML rendering

OpenLayers trac-20090302 at openlayers.org
Mon Oct 18 06:20:48 EDT 2010


#2884: Wrong VML rendering
-------------------------------------+--------------------------------------
  Reporter:  ondrejl                 |       Owner:  ahocevar    
      Type:  bug                     |      Status:  reopened    
  Priority:  major                   |   Milestone:  2.10 Release
 Component:  Renderer.VML            |     Version:  2.10        
Resolution:                          |    Keywords:              
     State:  Awaiting User Feedback  |  
-------------------------------------+--------------------------------------
Changes (by ahocevar):

  * state:  Review => Awaiting User Feedback


Comment:

 There are two things happening here:
  * your WMS rounds coordinates to pixels, the OpenLayers VML renderer
 clips them to integers (for performance reasons). This can result in a 1
 pixel offset.
  * the xhtml doctype causes IE to use the quirks mode box model, which
 also causes a 1 pixel offset.

 You can easily fix the former in your application by using a doctype that
 forces IE into standards compliant mode. To fix the latter, you should
 turn on subpixel hinting on your WMS (see my previous screenshot from
 GeoServer). If you cannot do that, you would either have to use the VML
 renderer of an older OpenLayers release (I think in 2.8 we still did
 {{{Math.round(number)}}} instead of {{{number | 0}}}, which was a major
 performance hit), or manually change the Renderer.VML code to round
 numbers again.

 Please let us know if this is enough to fix your issue.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2884#comment:5>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list