How to Create a Layer from a shapefile?

Developer
Jan 13, 2011 at 11:41 PM

The following code doesn't work:

ILayer myLayer = FeatureLayer.FromFile("c:\cities.shp");

I know that you can create the layer by using MapFrame.Layers.Add() or Map.AddLayer(), but how to create the layer when I don't have a reference to the map?

Developer
Jan 14, 2011 at 1:38 AM

This changeset e675ed999b7f  for my attempt.