Hi
I Want view .dwg file in Web (c#.net) but I could not…
i read sample but it worked by .shp file
it’s my code…
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Map1.MapUnit = GeographyUnit.Feet;
CadFeatureLayer featureSource = new
CadFeatureLayer(@“C:\Users\dani\Documents\Visual Studio
2013\Projects\WebApplication2\Data\output\1, TOURIST HOME.dwg”);
LayerOverlay overlay = new LayerOverlay();
overlay.IsBaseOverlay = true;
overlay.Layers.Add(featureSource);
Map1.CustomOverlays.Add(overlay);
}}
View dwg file in web
Hi Zainab,
Welcome to Map Suite forums!
From you codes, I noticed there isn’t an extent specified for the map. Would you please give the cad layer’s boundingbox value for the map extent? Try to add the below codes:
overlay.Layers.Add(featureSource);
Map1.CustomOverlays.Add(overlay);
featureSource.Open();
Map1.CurrentExtent = featureSource.GetBoundingBox();
If the issue persists, please try to run our CAD wiki sample to make sure it works fine in your machine. wiki.thinkgeo.com/wiki/Map_S…atureLayer this is because the CAD layer depends on a third-party library and you should see them under C:\Windows\SysWOW64\Map Suite 9.0<br />
CadX64(86)
Don’t hesitate to let us know if you have any questions.
Thanks,
Troy