Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to make a thematic map with Oracle source longitude and latitude values. I have made thematic maps with tab file source. Part of the code looks like this:

MapInfo.Engine.Session.Current.MapFactory[0].Layers.Insert(0, new MapInfo.Mapping.FeatureLayer(MapInfo.Engine.Session.Current.Catalog.GetTable("SPA_POINTS"), "TempThematicLayer", "TempThematicLayer")); 
 MapInfo.Mapping.FeatureLayer lyr = harita.Layers["TempThematicLayer"] as MapInfo.Mapping.FeatureLayer;

    MapInfo.Mapping.Thematics.RangedTheme ranthm = new MapInfo.Mapping.Thematics.RangedTheme(lyr, "MAGNITUDE", "SPA_POINTSThematic", 10, MapInfo.Mapping.Thematics.DistributionMethod.EqualCountPerRange);

What can I use instead of:

GetTable("SPA_POINTS")

or how can I make a thematic map with an Oracle table?

share|improve this question
    
is your source data in tab/oracle in lat/lng? Do you know how to load the tab file into oracle with the correct metadata? –  Mapperz Oct 18 '12 at 13:43

1 Answer 1

Once you have accessed Oracle table,it's opened as Server Table as an instance of MapInfo.Data.Table which means you can apply thematic option as you do on native tables(no difference in code).

MapInfo.Data.Table table = MapInfo.Engine.Session.Current.Catalog.GetTable("SPA_POINTS");
MapInfo.Mapping.FeatureLayer lyr = new MapInfo.Mapping.FeatureLayer(table, "TempThematicLayer", "TempThematicLayer");
MapInfo.Engine.Session.Current.MapFactory[0].Layers.Insert(0, lyr);
MapInfo.Mapping.Thematics.RangedTheme ranthm = new MapInfo.Mapping.Thematics.RangedTheme(lyr, "MAGNITUDE", "SPA_POINTSThematic", 10, MapInfo.Mapping.Thematics.DistributionMethod.EqualCountPerRange);

After this do not forget to refresh map
Best Regards

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.