Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
VectorLayer large memory usage on zoom level 9
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hermes David  
View profile  
 More options Feb 10, 6:54 am
From: Hermes David <hmdavidjun...@gmail.com>
Date: Fri, 10 Feb 2012 03:54:34 -0800 (PST)
Local: Fri, Feb 10 2012 6:54 am
Subject: VectorLayer large memory usage on zoom level 9
Hi,

Im extended VectorLayer and fixed the large processor usage as told on
other posts in this forum. But there is a memory issue that Im
debugging and cant find where it is happening. On zoom level 9
( maxResolution/Math.pow(2,9) ) the memory increases 500mb after
redraw. If you change the zoom level it releases imediately the
memory. I know that it has something to do with redraw, but the
problem is not there. My feature only has 2 points, cause when I add a
third point in Tokyo, and zoom to level 9 zoom, the flash pluggin
breaks. My code is below, any tip to where the memory problem is
happening will be a great deal. Thanks in advance!

                var style:Style = new Style();
                style.rules.push(new Rule());
                (style.rules[0] as Rule).symbolizers.push(new PointSymbolizer(new
WellKnownMarker(WellKnownMarker.WKN_SQUARE,new
SolidFill(0xFF9900,0.5),new Stroke(0xFF9900,2),10)));

                var featureLayer:OSVectorLayer = new OSVectorLayer("MyPoints");
                featureLayer.projection = EPSG_4326;
                map.addLayer(featureLayer);

                var geomPoint:org.openscales.geometry.Point;

                //MT
                geomPoint = new org.openscales.geometry.Point(-56.0852417369095,
-15.5959780446607);
                geomPoint.projection = EPSG_4326;
                featureLayer.addFeature(new PointFeature(geomPoint,null,style));

                //NY
                geomPoint = new org.openscales.geometry.Point(-74.0061344408378,
40.7133534576121);
                geomPoint.projection = EPSG_4326;
                featureLayer.addFeature(new PointFeature(geomPoint,null,style));

//My custom VectorLayer
package com.openscales
{
        import org.openscales.core.layer.VectorLayer;
        import org.openscales.core.layer.osm.OSM;

        public class OSVectorLayer extends VectorLayer
        {
                public function OSVectorLayer(name:String)
                {
                        super(name);
                }

                override public function redraw(fullRedraw:Boolean=false):void{
                        if (fullRedraw || _centerChanged || _projectionChanged ||
_projectionChanged){
                                super.redraw(fullRedraw);
                        }
                }

                override public function clear():void{
                        this._centerChanged = false;
                        this._resolutionChanged = false;
                        this._projectionChanged = false;

                        super.clear();
                }
        }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »