Hi, I’m using InMemoryFeatureLayer to show points I get from a REST endpoint. But all features I add to it are rendered at (0, 0) coordinate.
It works fine if I use the ShapeFileFeatureLayer loading files I created using MapSuiteGisEditor tool.
Here is my code. Am I missing something? Should I add the projection somewhere?
internal Layer GetPointLocations()
{
var vertex = new Vertex(-85, 32);
var feature = new ThinkGeo.MapSuite.Shapes.Feature(vertex, "2424994");
feature.ColumnValues.Add("Metadata1", "Meta1");
feature.ColumnValues.Add("Metadata2", "Meta2");
var features = new List<ThinkGeo.MapSuite.Shapes.Feature>{ feature };
var featureColumns = new List<FeatureSourceColumn>
{
new FeatureSourceColumn("Metadata1"),
new FeatureSourceColumn("Metadata2")
};
var memoryLayer = new InMemoryFeatureLayer(featureColumns, features);
var icon = Path.Combine(_imagesDirectory, "location-light.png");
var markerStyle = new PointStyle(new GeoImage(icon));
memoryLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = markerStyle;
memoryLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
return memoryLayer;
}