ThinkGeo.com    |     Documentation    |     Premium Support

Shape file rendering/display problem in Hosted web application

Dear all,

I am facing one issue in my application, that is World map shape file display/rendering…

I am using Countries shape file for displaying World map in my application.

And i am using Projection in my application

  • Internal - Proj4Projection.GetEpsgParametersString(4326)
  • External - Proj4Projection.GetEsriParametersString(54004)

And i am using ServerTileCache in my application.

When I run the application in locally the shape file display is correct.

But the problem is same hosted application displaying World map shape file wrongly… shown below

And my server tile cache folder is shown below

Please check this issue and guide me where is the problem and solution for this.

Thanks,
Bibek

Hi Bibek,

From your description and screen shot, it looks the problem is your cached tile have problem.

But we cannot make sure where is the problem only from your currently information.

For now, you can delete the cache and then build them again.

If you found that’s caused by multiply users, you can build a standard cache, then copy it to your server and set the cache as readonly.

Regards,

Ethan

Hi Ethan,

Thanks for your reply.

I tried to set Server cache as readonly, but i am not getting the property in web edition. can u please send me a sample code for it.

This is my code
if (!wfMap.CustomOverlays.Contains(“World Map”))
{
lo = new LayerOverlay(“World Map”, true, TileType.SingleTile);
lo.TransitionEffect = TransitionEffect.Stretching;
lo.TransitionEffect = TransitionEffect.Stretching;
lo.ClientCache.CacheId = _UserInfo.UserName;
lo.ClientCache.Duration = new TimeSpan(2, 0, 0, 0);
if (ddlbaseMaps.Items.Count > 0)
{
ListItem mapItem = ddlbaseMaps.Items.FindByValue(_sDefaultBaseMap);
if (mapItem != null && mapItem.Text != “”)
{
lo.ServerCache.CacheId = mapItem.Text;
lo.ServerCache.CacheDirectory = Server.MapPath(".") + @"/ServerTileCache";
}
else
{
lo.ServerCache.CacheId = ddlbaseMaps.Items[0].Text;
lo.ServerCache.CacheDirectory = Server.MapPath(".") + @"/ServerTileCache";
}
mapItem = null;
}
wfMap.CustomOverlays.Add(lo);
}

Thanks,
Bibek

Hi Bibek,

Thanks for your reminding, I ignore the FileBitmapTileCache don’t works for WebForms.

Yes it cannot be set as readonly, but I think if the tile image existing there, it won’t be cover when the map access the same area.

So you can delete original tile cache and try the function layerOverlay.GenerateCacheImages to pre-build some tile images, I think it can avoid this problem.

Please notice it will be so slow if you generate deeper zoomlevel cache, please try whether this API works for your scenario in higher zoomlevel first.

Regards,

Ethan

So What is the solution for this ? are you trying to release something in next version?

Hi Bibek,

Have you tried my suggestion to pre-build tile images?

And I view your two images again, could you please double check whether the local code is just the same as your server code? Because I found an area looks render correct but the lake is only appear in your server image.

If you make sure they are the same, and it’s caused by cache(Close cache can make sure it), you can just delete currently cache images, and copy your correct ones to server for solve it.

Regards,

Ethan