Resolve features not appearing on a map when zooming out in MapXtreme.NET


The following or similar scenario can causing issue with map features when zooming out in MapXtreme.NET®: 

Feature are displayed on a map by working out the minimum and maximum x and y coordinates for the required view and retrieve the features using these coordinates in a SQL query from an Oracle database. 

When zooming out, the minimum and maximum x and y coordinates of the map window change and the rest of the features are not displayed.


This is caused by the select statement only displaying the features in the initial view. Zooming out will require another select statement to be ran.


UPDATED: October 11, 2017

This is not the best approach to display features and will constantly need to workout the current view and then rerun the select statement.

A better approach would be to load all of the features at the beginning of the application, even if they do not appear on the current map view.

Please see the sample code below taken from the Developer Reference Guide under the heading "TableInfoServer Class", this access a DBMS table to load the table.
public static void MapInfo_Data_TableInfoServer(MIConnection connection) {
// Note: Do not specify any columns. These are determined dynamically from the query.
TableInfoServer ti = new TableInfoServer("States");
ti.ConnectString = "SRVR=ontario;UID=mapx;PWD=mapx";
ti.Query = "Select * From States";
ti.Toolkit = ServerToolkit.Oci;
ti.CacheSettings.CacheType = CacheOption.Off; // On is the default
Table tbl = connection.Catalog.OpenTable(ti);

Environment Details

Product Affected: MapXtreme.NET


  • No Downloads