MapBasic is a programming language for creation of additional tools and functionality for the MapInfo geographical information system.

learn more… | top users | synonyms

2
votes
3answers
436 views

Is it possible to retrieve thematic layer information for a Layer in Mapbasic?

I found this code windowinfo(FrontWindow(), WIN_INFO_CLONEWINDOW) This function gives information (mapbasic) about the front Map window which can be used to regenerate the map. Is there any ...
0
votes
1answer
280 views

How to reuse Thematic layer definitions in Mapinfo?

I have a map from table. Let the table be TABLE1. Now That I have created Thematic Map from Column1 of this table. Again I executed the following query Select * from TABLE1 where TABLE1.column1 ...
1
vote
1answer
235 views

What is the sequence of select query execution in Mapinfo?

I have confusion with the following query: Query 1: Select * from TABLE where vendor = "vendor1" OR "vendor2" OR "vendor3" ...
0
votes
1answer
1k views

How to run query in mapbasic?

I made a Query in Mapbasic like : Dim query As String query = "Select * from some_table" How to run query to form table? Is it possible to save selected value in variable without forming table?
2
votes
1answer
90 views

Does mapbasic support function overloading?

I am creating application with mapbasic. Now that it's been some time with mapbasic I found that the language is very fundamental and does not support functionality that I took for granted in Java or ...
0
votes
1answer
189 views

Is it possible to find if a value is present in Array without looping in mapbasic?

How to find a value is present in array without looping ? e.g. For i=1 TO ubount(Array) Find if value is present Next or some more direct statement like Array.contains(somevalue) like in java ...
1
vote
2answers
643 views

How to add element to Mapbasic Array?

Code: Dim name_array() As String Redim name_array(10) How to add value to the array? I know we can add value by specifying index like name_array(i) = "some_value" But I don't want to specify ...
1
vote
1answer
171 views

Is toggle button's state stored in some property in Mapinfo?

Well can we retrieve On or OFF state of toggle button. Do we have any property of toggle button that can be read from toggle button that is ON or OFF?
1
vote
1answer
702 views

Is it possible to create Thematic Maps using two columns in Mapinfo?

I have created Thematic map with one column in Mapinfo. Is it possible to create Thematic Map using two columns in Mapinfo? For Example: I have a column with name of place and a column with date. ...
0
votes
1answer
707 views

How to create a Button with custom Icons in Mapinfo 10?

I am using mapinfo 10 and I have created dll with Pelles C with 16*16 and 24*24 bmp images. I placed the dll file into folder containing .mbx file but I get error : Unableable to locate external ...
1
vote
1answer
330 views

Adding text as ICON in mapinfo in mapinfo buttons

It's a question with yes or no answer and if yes How? Is it possible to add text label as icon in mapinfo buttons. Instead of : Create buttonpad "sitestatusbutton" As ToggleButton ID 1011 ...
5
votes
2answers
4k views

Easy way to Create Vector Grid polygons?

We're currently using MapInfo & MapBasic to analyze daily tests results for planning purposes.For each test,exported result may contain empty values (say 999,we know Mapinfo has no NULL values),so ...
1
vote
0answers
114 views

Reload image in MapInfo

I have a mbx that creates a layout. The layout consist of a number of .wmf pictures and ofcource a map. During the execution I create .Tab files that reference to the pictures looking like: ...
0
votes
1answer
588 views

MapInfo - programmatically find if layer is hidden

I am working on an integrated mapping project. I would like a button that toggles a layer. I could hold the layers status in a variable and then show/hide it as appropriate but this seems a little ...
0
votes
1answer
385 views

How does MapInfo handle button identifiers?

As in create button pad statement: Create ButtonPad { title_string | ID pad_num } As button_definition [ button_definition ... ] [ Title title_string ] [ Width w ] [ Position ( ...
1
vote
1answer
568 views

How to draw points in MapBasic? [closed]

how can we draw a point object in mapinfo using mapbasic, my objective is to generate an array and then map it. Thanks
0
votes
1answer
390 views

Making a Button in mapinfo with conditional function

I have following code : Sub create_ButtonFromVendor Dim i As Integer i=1 Create ButtonPad "allVendor" As ToggleButton Icon MI_ICON_ZOOM_QUESTION Calling ...
1
vote
1answer
696 views

How to handle select query to return numeric value?

I have the following select Query : Dim count As Integer Select count(*) as mycount from some_table into temp_table Fetch First From temp_table count = some_table.mycount But it sends error: ...
0
votes
1answer
401 views

Using data from table to make buttons in Mapbasic?

I have select Query that selects distinct value from a column. Is is possible to use these distinct values in my mapbasic program to make buttons and button labels? More Info: SQL Query : Select ...
0
votes
1answer
988 views

How to dynamically connect Excel data sources to MapInfo?

How to connect Excel(2010) with Mapinfo(10.0)? I saw that Excel can be connected using Excel as Data Source but my Data Source is already MS-SQL. Actually I would like to reflect any changes in excel ...
2
votes
1answer
877 views

How to draw lines of specified lengths in specified directions in Mapinfo?

I have an Excel file with the following data: 1) longitude and latitude which represents a point 2) Angle which represents where line turns from North 3) length of line. Is is possible to draw ...
1
vote
1answer
463 views

How to handle line data in Mapinfo?

I have laoded my lines data in MS-SQL in one table. I have points data in DBMS as well in separate table . When I open both table the map window would show lines and points as I want but now when I ...
4
votes
2answers
2k views

How to select distinct values from a column in Mapbasic?

I have a table in a mapinfo .tab file. Is there any way to select distinct values from the column? I tried :- SELECT distinct (some_column) from table_name into temp_table But this query would ...
0
votes
1answer
312 views

Where does MapInfo store its error and log files?

I am having errors opening a table with spatial co-ordinates in Microsoft SQL and my question in gis.stackexchange is here. I want to know where are the error and log files of Mapinfo stored. I ...
0
votes
1answer
764 views

How to select nth row in mapbasic?

There are multiple rows in my .tab file in mapinfo. Is there any way to select nth row in mapbasic window of mapinfo?
0
votes
1answer
926 views

How is object created as line using createline stored in .tab file?

I used Mapbasic and made data imported from excel into mappable and added projection to WGS 84 and updated table using: update TABLE set obj = createline(x1,y1,x2,y2) to create line and the line ...
0
votes
1answer
396 views

How to upload lines created by joining longitude, latitude pairs?

The data in a Mapinfo table contain longitude and latitude pairs. I have joined the point pairs using : Making the table mappable Setting the projection to WGS84 and update TABLE set obj = ...
0
votes
1answer
2k views

How to connect mapinfo 10 with bing map or other mapping service?

Is there way to connect mapinfo with bing or google map. I have done this with mapinfo 10.5 but could not find it with mapinfo 10.
1
vote
1answer
2k views

How to connect points to line in Mapinfo?

I am using Mapinfo and Mapbasic. I have all the points stored in a DBMS. I have four columns with four points longitude and latitude. Is there any way to connect the points? I am using Mapinfo ...
0
votes
1answer
839 views

Remove non-alphanumeric characters from a string in Mapbasic

I have a user-entered string which I am using as a search term. I would like to display the results in a table named "SearchResults_"+SearchString. However the string could feasibly contain characters ...
0
votes
1answer
415 views

Combining MapInfo records with a duplicate value

I have a MapInfo table with a lot of points in it. The points are clustered together - they represent the first part of a post code, so they're in a similar position but not identical. What I would ...
0
votes
2answers
188 views

How to uncheck toggle button in mapbasic?

I want to check un check togglebutton but I don't know how to alter using mapbasic. Is there any command to alter it? I could not find it in MapInfo user guide. I have command: Alter Button But ...
0
votes
2answers
285 views

How to find which table has layer in mapinfo?

Is it possible to find if table has layer Or print list of layers? Edit:: I have a table when I selete some data from table like: Select * from earth where population >100 Then it create new ...
0
votes
1answer
150 views

How to manipulate select query in mapinfo so that it does not high light the selected data?

I have select query in a button but I don't want user to see the way I am changing the map coordinate while selecting specific points and adding a layer. How is it possible to do that in a button ? ...
0
votes
1answer
66 views

What kind of table is bingHybrid?

I closed all table but I don't wan't to close underlying map eg like bingHybrid in mapinfo. How to prevent. Any detail about there map and way to handle while closing layers would be appreciated.
0
votes
1answer
524 views

How to close all layers in Mapinfo?

I want to close all layers in Mapinfo except one and again add one layer. How to do so in Mapinfo using Mapbasic or without?
1
vote
1answer
467 views

How to hide coordinates points in mapinfo?

I have created labels ,legends scale and North-direction pointer but I now need to conditionally hide or show the points using button in mapbasic program but I don't know the syntax. Where can I ...
0
votes
0answers
140 views

Is there any way to fix the position of fixed buttonpads in the top toolbar in MapBasic?

Here is my code to create some buttons : Include "icons.def" Declare Sub Main Declare Sub button_prompt Sub Main Create ButtonPad "Providers" As PushButton Icon MI_ICON_ZOOM_QUESTION Calling ...
2
votes
1answer
651 views

How to add custom Icon to buttons on buttonpads in mapinfo?

I have made buttons with icons availabe in mapinfo but now i want to add custom icon. Is it possible my code is as follows: Include "icons.def" Declare Sub Main Declare Sub button_prompt Sub ...
2
votes
1answer
2k views

Creating MBO files with MapBasic and Notepad++

[Note: I have been using Notepad++ (with some customisations as per this page), rather than MapBasic itself. This may make things a bit trickier, but so far the time saved in development has been ...
1
vote
2answers
2k views

What are the best ways to connect two coordinates on mapinfo?

I have with the help of this forum drawn a coordinate system with longitude and latitude at different location. I am trying to connect these sites what is the best way to connect. Is it just drawing ...
0
votes
1answer
6k views

How to plot geographical coordinates in mapinfo?

I want to get started with mapinfo and plot some coordinates i.e latitude and longitute . How is it possibe?
1
vote
1answer
1k views

Finding text object variable names in MapInfo/MapBasic

In MapBasic you can create a text object in a layout window by using the "Create text" statement. You can also use the same statement to update this object. I am working on a tool that creates ...
5
votes
3answers
5k views

Getting Started with MapBasic?

I am new to MapBasic. I googled for tutorials and found various PDFs but could not get started with the resources. I would be glad if anyone could provide some path for learning MapBasic.
4
votes
1answer
324 views

Copy text to clipboard with MapBasic

I think the title says it all - is it possible to programmatically copy/paste some text to/from the windows clipboard using MapBasic? I have found this discussion but it only discusses copying and as ...
0
votes
3answers
2k views

Copying objects to existing records in MapInfo

This should be fairly simple but I think I'm missing something... I have two tables of similar structure with corresponding data in them (i.e. same number of rows, rows have the same IDs). The main ...
3
votes
3answers
1k views

Definitions and limitations of MapInfo TAB file objects

I am working on a MapInfo plugin to convert MapInfo files to GeoJSON files. I am having trouble matching up the object types of the two formats. Each GeoJSON object type is described in the ...
6
votes
2answers
1k views

Converting MapInfo TAB to GeoJSON

Is there an easy way to convert MapInfo TAB files into GeoJSON? I am working on a web-based mapping system which will use GeoJSON to transfer data. I also use MapInfo and would like to be able to ...
3
votes
3answers
2k views

Create closest-distance line in MapInfo

As part of a larger program (basically a remake and extension of DistanceCalc) I want to programmatically create a line between the two closest points of two regions in MapInfo. The ObjectDistance ...
0
votes
1answer
1k views

Finding the type of object in MapBasic (MapInfo)

I am trying to write a MapBasic function to check whether or not an object can be used with the Overlap/AreaOverlap functions - I need to tell whether it's a closed shape or a line/arc/point/text ...