View Full Version : Google Maps

2019-10-22, 07:55
Hi Guys

Adding a web gadget map to a page as per the Lianja demo with the URL controlled by a memvar, rather than a table so that we don't have to wait for a SAVE()before the changes are made.

We are struggling with the syntax, having now tried every combination we can imagine

We know that setting the URL to lib:/showdialog_map.rsp?address={"FY7 8JW"} - works - it's near Blackpool in the UK and postcode alone is fine

What we are trying to do is :

Approach 1

Set the URL to lib:/showdialog_map.rsp?address={map1}

then populate the public memvar map1 in a function with a postcode that we know works. FAILS

Approach 2

Set the full URL in the webview gadget each time

var map1 = "FY78JW";
var mapstring = "lib:/showdialog_map.rsp?address=&map1";
Lianja.getElementByID("page.section.mapwebview").url = &mapstring;


What are we missing?



2019-10-22, 12:17
What is &map1 and &mapstring?

it seems you are expecting VFP macros to work in JavaScript. These are two different languages.