Hi All, though I would share my recent experience.
I've created a Custom Table view, Layer and Map and have come across a slight issue.
This map has been added to a project and the info panel works as it should for the map project.
====================
Problem:-
When I click either "Show on Map" or "Add as annotation" the screen comes up with an error and I can't click on objects without a browser refresh.
========================
Solution:-
I found an error message using the Developer window in Chrome (F12):-
{type: "com.mapinfo.midev.service.feature.ws.v1.ServiceException",…}
- message: "Invalid expression. Unable to resolve MI_KEY for table with no primary key for expression MI_key"
- type: "mapinfo.midev.service.feature.ws.v1.ServiceException"
Looks like Primary key for the object is missing when you create a view.
This works (I added "MI_KEY" field to the custom MI SQL query):-
SELECT
Obj, MI_Style,
MI_KEY,
PROP_PFI as "Prop PFI",
MOO_PROP_NO as "Prop Number",
EZI_ADDRESS as "Address",
Round(MI_AREA(obj, 'sq m', 'Spherical'),4) as "Area SqM" ,
Round(MI_AREA(obj, 'sq m', 'Spherical'),4)/10000 as "Area Ha",
etc.....
FROM "/Moorabool/Data/INTEGRATION"
After clicking "See on map" this is the result.
------------------------------
Tim Warfe
GIS Officer
MOORABOOL SHIRE COUNCIL
------------------------------