Hi,
I’ve found out that my Map Control custom zoom level set is not in sync with the OsmWorldMapKitLayer layers zoom set.
The map control shows layers’ styles based on the default zoom level set, which is different from the custom map control zoom set.
I’ve added a code to the OsmWorldMapKitLayer.GetFeatureLayer function to set my custom zoom set for each layer. After that, the map control crashes with the “Type ‘xRM=.wRs=’ in Assembly ‘MapSuiteCore, Version=9.0.0.0,
Culture=neutral, PublicKeyToken=null’ is not marked as serializable.” error. My custom zoom set did not have any problems on the map control before. How can I set layers custom zoom set?
private FeatureLayer
GetFeatureLayer(string tableName)
{
FeatureLayer
layer;
if
(databaseType == OsmWorldMapKitDatabaseType.Sqlite)
{
layer = new SqliteFeatureLayer(connectionString,
tableName, featureIdColumnName, geometryColumnName);
layer.Name = ((SqliteFeatureLayer)layer).TableName;
}
else
if (databaseType == OsmWorldMapKitDatabaseType.Postgres)
{
layer = new PostgreSqlFeatureLayer(connectionString,
tableName, featureIdColumnName, srid, schemaName, geometryColumnName);
layer.Name = ((PostgreSqlFeatureLayer)layer).TableName;
}
else
{
throw
new Exception(“Invalid database type.”);
}
layer.ZoomLevelSet
= customZoomLevelSet; //the custom zoom set is already created on
return
layer;
}
protected override void OpenCore()
{
customZoomLevelSet = GeCustomZoomLevelSet();
…
Please help,
Thanks,
Gene