6 Replies Latest reply: Aug 13, 2014 12:03 PM by yedidya a RSS

    Return URL generated in VBscript to Macro

    Jes Hynes

      Hi Folks,

       

      I recently posted about an issue I'm having with URL signing of Static Maps in GoogleMaps for Business, which is required in order to record usage statistics.  A number of problems have derailed this but I think I've now got a solution, which I shall post up if it pans out.

       

      The issue around signing is that the facility is not available within Jscript or VBScript without downloading an ActiveX component which is not a viable solution.  Further, each unique call needs to be individually signed, thereby requiring a dynamic solution.  As such, I've proceeded by creating and deploying a WebService that takes the address, zoom level, channel, and the client id and private key, carries out the signing and finally returns the signed URL.  I've then written a VBscript routine that consumes this web service and stores the signed URL in a variable.

       

      So what I need to do now is to somehow call this VBscript function in the script below:

       

      let noRows = NoOfRows('Table1')-1;

      for i=0 to $(noRows)

      let a=peek('FirstName',$(i),'Table1');
      let b=peek('LastName',$(i),'Table1');
      let c=peek(‘ProductSold’,$(i),'Table1');
      let address=peek('City',$(i),'Table1'); 


      Data:
      LOAD
      '$(a)'
      as FirstName,
      '$(b)'
      as LastName,
      '$(c)'
      as ProductSold,
      '$(address)'
      as Address,
      subfield([Response/Placemark/Point/coordinates], ',' ,1) AS longitude,
      subfield([Response/Placemark/Point/coordinates], ',' ,2) AS latitude
      FROM [http://maps.google.com/maps/geo?q=$(address)&output=xml&oe=utf8&sensor=false&key=XXYYZZ] (XmlSimple, Table is [kml]);

      next 

       

      replacing FROM [http://maps... etc with my routine (obviously passing the parameters too).

       

      Can anyone shed any light on how I might acheive this? 

       

      Thanks,

       

      Jes