OpenLayers OpenLayers

Ticket #541 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

Drawing a single point takes inordinate amount of time

Reported by: crschmidt Assigned to:
Priority: minor Milestone: 2.4 Release
Component: general Version:
Keywords: Cc:
State:

Description (Last modified by crschmidt)

The following chunk of GML takes a huge amount of time to render. It seems that the drawCircle function in Renderer.SVG is taking this time:

drawCircle: function(node, geometry, radius) {

node.setAttributeNS(null, "cx", geometry.x); node.setAttributeNS(null, "cy", geometry.y); node.setAttributeNS(null, "r", radius);

},

commenting out the 'r' setAttribute causes the layer to load quickly, but to not show anything (since it has no radius).

I don't get it.

<?xml version='1.0' encoding="utf-8" ?>
<wfs:FeatureCollection
   xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
   xmlns:wfs="http://www.opengis.net/wfs"
   xmlns:gml="http://www.opengis.net/gml"
    >
    <gml:featureMember>
      <ms:PointsOfInterest>
        <ms:msGeometry>
        <gml:Point srsName="EPSG:4326">
          <gml:coordinates>3.059317, 36.768121 </gml:coordinates>
        </gml:Point>
        </ms:msGeometry>
      </ms:PointsOfInterest>
    </gml:featureMember>
</wfs:FeatureCollection>

Attachments

SVG_reproject.patch (6.0 kB) - added by crschmidt on 04/01/07 19:40:53.
SVG_reproject.2.patch (6.0 kB) - added by crschmidt on 04/01/07 19:53:45.

Change History

03/18/07 23:34:29 changed by crschmidt

  • description changed.

03/26/07 13:46:17 changed by tschaub

  • type changed from feature to bug.

I assume this is the problem experienced here http://www.nabble.com/Drawing-a-Point-Feature-in-Firefox-is-Slow-tf3468483.html

I think this is a bug at best - perhaps a blocker for 2.4.

04/01/07 17:02:28 changed by sderle

  • status changed from new to closed.
  • resolution set to worksforme.

we can't seem to reproduce this bug? some one please reopen this with a concrete use case that triggers the bug, if at all poss.

04/01/07 17:20:02 changed by sderle

  • status changed from closed to reopened.
  • resolution deleted.

04/01/07 18:04:21 changed by crschmidt

So, I can reliably reproduce this bug in Firefox. However, Neither Webkit Nightlies nor Opera demonstrate this bug, which lead me to believing it's a bug in Firefox's SVG implementation.

04/01/07 18:33:54 changed by crschmidt

Firefox's SVG renderer can't reliably draw points beyond a certain scale. (Because of the way our SVG support currently works, the coordinates are geoegraphic, and it appears the very small circle radius breaks Firefox).

The fix to this is essentially to turn the geo-space into pixel space, thus removing the need for very-tiny points. This is similar to the change made to the VML renderer.

I'm going to start working on this now.

04/01/07 19:40:53 changed by crschmidt

  • attachment SVG_reproject.patch added.

04/01/07 19:45:57 changed by crschmidt

  • keywords set to review.
  • Change coordinate space to be pixel based.
  • Redraw nodes totally on every 'reprojectNode' call
  • Make all x/y operations divided by resolution
  • add getComponentsString, getShortString helpers

04/01/07 19:53:45 changed by crschmidt

  • attachment SVG_reproject.2.patch added.

04/01/07 19:55:20 changed by crschmidt

typo in drawCurve/drawSurface fixed in this patch

04/01/07 20:13:13 changed by sderle

  • keywords changed from review to commit.

patch #2 looks good. please commit.

04/01/07 20:16:25 changed by crschmidt

  • status changed from reopened to closed.
  • resolution set to fixed.

07/05/07 16:55:47 changed by euzuro

  • keywords deleted.