I am loading almost 20 shapes on the map at different zoom levels from 8 to 15 and these all shape files size are arround 1 GB. When I zoom to 13 level from 5 level, its takes load of times to display shapes on the map. Please refer below site:
Badal, It seems that you excess the periods of evaluation, maybe you need to ask for an extension from Support@thinkgeo.com . But from your configuration list, i have a question: Can your application allow displaying some shapefile including major roads? It seems that we are unable to see the outline of the shape, see the image:
Another way is that you can define one LayerOverlay per shapefile or just for some big shapefile, and then generate the cache for the overlay in certain extent has lots of features. This way will speed up the performance absolutely. You can use layeroverlay.GenerateCacheImages to generate the Overlay cache, Thanks, Johnny
Can your application allow displaying some shapefile including major roads? It seems that we are unable to see the outline of the shape, see the image:
Well, i am not getting you here, are you saying the major road which are on the screen are not smooth? yes, they are not smooth but they looks smooth if i used the default textstyle like
But client want some custome color so i wrote this
zoomLevel.DefaultLineStyle.InnerPen = new GeoPen(GeoColor.FromHtml("#a5d4e3"),4);
zoomLevel.DefaultLineStyle.OuterPen= new GeoPen(GeoColor.StandardColors.Transparent,0);
After that, they are not so smooth..
Yes, i have try to cache the shapes as per your suggestion but was not much successful in Implementation. Can you provide me sample code here which will be much appreciated since i am stuck here.
I have attached my sample code here showing how do i load the shapes in a map.
I noticed that your map maybe had different combination of overlays, so I suggest that you generate cache for every LayerOverlay which just includes one ShapeFileFeatureLayer.
If you want to see the cache effect for your map, please set the ServerCache and ClinetCache property on the LayerOverlay to see the results.
As i told you my shape file has bigger size and i am trying below code Collection<ZoomLevel> zoomLevels = GetAllZoomLevels(); int tileWidth = 256; int tileHeight = 256;
//if (tileExtent.Width > cacheExtent.Width || tileExtent.Height > cacheExtent.Height) if (rowColumnRange.MaxColumnIndex == 0 && rowColumnRange.MaxRowIndex == 0) { mapEngine.CurrentExtent = tileExtent; bitmap = new Bitmap(tileWidth, tileHeight); } else { int bitMapWidth = tileWidth * ((int)(rowColumnRange.MaxColumnIndex - rowColumnRange.MinColumnIndex) + 1); int bitMapHeight = tileHeight * ((int)(rowColumnRange.MaxRowIndex - rowColumnRange.MinRowIndex) + 1); mapEngine.CurrentExtent = cacheExtent; // if the bitmapWidth is very big, you need to optimize the way generating tiles, otherwise the bitmap will be too big for the memory. // For example, you can always generate a 1024 * 1024 bitmap and then split it into 4 512*512 tiles bitmap = new Bitmap(bitMapWidth, bitMapHeight); }
Th above code throws error in the below line bitmap = new Bitmap(bitMapWidth, bitMapHeight);
Error is, "Parameter is not valid." i got bitMapWidth=10000+ and bitMapHeight=11000+ Can you throw some light here so i can get pass the issue and make cache for my shape files…
The exception is caused by that you pass so big width and height for the Bitmap object. Anyway, you could save one every time whose size is 256*256. Please refer to the codes in the attached file.
Another thing is that you can't dump anything else into the cache directory, otherwise you won't get right result.