Skip to Content

A while back I was asked to allow my users to enter their patient address and then use the default address to generate google directions for them. With the help of the community here I was able to use the following code to create an instance of inet object:

inet li_net

GetContextService(“Internet”, li_net)

li_net.HyperlinkToURL( ls_URL )

I built the ls_URL from our default address that was basically like:

300 east long lake road, city name (with a space in it)

However when I passed this address (with spaces) to INet HperlinkToURL method google maps will not generate the correct directions. I found out that in order for right google directions to be generated using INet object HperLinkToURL method I must stuff all spaces in my address with ‘%20’ and only then a space will be treated as space by google webservice that returns the proper address. This was shared with the community via the forum discussion as well but since this was something I thought I can create a document for and make it permanent for other people to benefit. I hope this will help. 

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

    1. javed rehman Post author

      Bruce: thank u so much for your comments, always contributing something. However I was using IE 9.0 but the browser did not automatically encode the spaces for me, I had to explicitly code them before passing it to inet.hyperlinktourl method. Once I did the explicit encoding everything worked fine.

      (0) 

Leave a Reply