Error message: OpenURL statement url is malformed

I’m helping a friend convert some very large and complex databases from Panorama 6.0 to Panorama X and I need some help. This code:

local mapURL,mapRoot,mapStreet,mapCity,mapState,mapZip,mapCountry
mapCity="Las Vegas"
mapRoot="<redacted code>&q="

mapURL=mapRoot+arraystrip(replace(mapStreet+" "+mapCity+" 
"+mapState+" "+mapZip," ","+"),"+")

shellopendocument mapURL

produces this message:


The code is supposed to display the Serv.Address location in Google Maps. The code uses a variable called mapURL which is not good given that Panorama X has a function, mapurl(, but changing that makes no difference.

If I put

into Safari I get the correct map display.

Seems to be an embedded return in the quoted space between mapCity and mapState.

For Panorama X, I would recommend using the mapurl( function instead of “rolling your own”

I’ve never heard of before. Looks like it is a paid mapping service. If you want to use that, I think Gary is correct about the carriage return.

I saw that too but, when I removed it, I got this:


Using the openurl statement instead of openanything, it seems that the content of the url string can be quite flexible. These all work:

openurl ",+Las+Vegas,+NV+89129,+USA"
openurl " Hickam Ave, Las Vegas, NV 89129, USA"
openurl " Hickam Ave Las Vegas NV 89129"

but I’m having great difficulty constructing them.

These both work (with the variable name changed for neatness):

ABmapURL=mapRoot+arraystrip(mapStreet+", "+mapCity+", "+mapState+", "+mapZip," ")
ABmapURL=mapRoot+arraystrip(mapStreet+" "+mapCity+" "+mapState+" "+mapZip," ")

Mission accomplished (I think).

Possibly so but I can’t get mapurl( to work when I have to use the arraystrip( function. I keep getting an “incorrect number of parameters” message.