I have a .csv file containing GPS readings, with Lat and Lon columns. I want to display these GPS points on a separate map, along with some other data.
I’ve added a new custom button to my ribbon that simply runs a MapBasic subroutine to create and show the GPS points. However, when I try to add these points, they end up plotted far from their expected positions.
My first guess was that some other tables with a different coordinate system (CRS) might be interfering. So I simplified my subroutine to just this part:
But the problem persists.
Here’s the strange part: if I run this code manually in the MapBasic window, everything works fine. Also, if I create a test .mb file with just a Main subroutine containing this code, it works as expected.
So my suspicion is that something in my original MapBasic code (the one that sets up the ribbon and other tools) is causing this, but I can’t find what it might be. I’ve reviewed it and nothing stands out.
Any ideas what could be affecting the coordinate system or the map setup?