Are there any javascript experts out there? I have created a data download web application where you draw a polygon and return some data. I have done this primarily from some samples made available on the knowledge base. It looks ok I have customized it a bit and added some extra functionality/background mapping.
This is all working very well when I draw my polygon and submit the request it goes to Server and my data returns.
Problem is I want to run the workspace even if a polygon is not defined/drawn - as in I have another parameter option to input x,y min and max values. I would like the workspace to submit without the polygon geometry part being drawn.
Â
Â
But when I try to do this I get the following error stating it can not read length
mapinfo.js:175 Uncaught TypeError: Cannot read property 'length' of undefined
at processClip (mapinfo.js:175)
at HTMLInputElement.onclick (mapinfo.html:1)
Â
Â
Can anyone tell me how I could get around this basically if its null ignore or something similar? I have tried a number of things but I am struggling to get anywhere.
Â
If I run the url directly with the geom value empty the workspace runs fine
Â
http://server/fmedatadownload/repository/workspace.fmw?INPUT_POLYGON=&INSERT_COORDS=&MITAB_VERSION=1150&QUARTER=DLM_CORE_2020Q1&OUTPUT_COORD_SYS=IRELAND-ITM&PRIME2_CLASS_YES_NO=No&CBD2019_YES_NO=Yes&NAME=Ciara Beddy&EMAIL=myemail&CUSTOMER=Test&GEOM=POLYGON(())
Â
I have attached the javascript used -- any assistance would be greatly appreciated