Hot answers tagged

2

You can not cast a FeatureClass into a ILayer! Here's the proper way to reach an ILayer from a FeatureClass: .... IFeatureLayer fl = new ESRI.ArcGIS.Carto.FeatureLayer() fl.FeatureClass = FC; var l = fl as ILayer; axMapControl1.AddLayer(l); I am assuming all of your previous methods are correct and you have a valid IFeatuerClass (FC).


2

If the featurelayer is selected in the TOC then you can use the DeleteLayer method of IMap. Otherwise you need to first disconnect it from the data source by casting the layer to IDataLayer2 and then calling the disconnect method. This is mentioned at the bottom of the help file: IMap.DeleteLayer Method Also it would be a good idea to catch your exception ...


1

The Hibernate Page page has some fine print that may point to your issues. NOTE: Type parameters (see NHibernate mapping above) are not supported in ActiveRecord. ... NHibernate Mapping: In the XML mappings file, map all properties as usual but for geometry columns use the following entry: <property name="Geometry" column="the_geom" ...


1

Try to see src sample that demonstrates how to work with google maps: show map control, spatial tree objects, download map, print map, work offline with local cache etc: https://github.com/agafonoff2000/SimpleMap



Only top voted, non community-wiki answers of a minimum length are eligible