Jump to content
Sign in to follow this  
Aussie John

Extracting data from google maps

Recommended Posts

Hello

I have calculation to show a google route map in a web viewer container. From this I extract the distance using GetLayoutObjectAttribute. A couple of issues:

1. Is there any way I can freeze the result, as each time I go to record the web page refreshes. 

2. The distance only calculates if the object is visible making it unusable in another calculation or a different layout.

 

In both instances I probably doing something wrong with storage but if I store the result, the calculation stays empty. Any thoughts?

thanks

Share this post


Link to post
Share on other sites

A stored calculation will recalculate only when one of the referenced fields is modified. You didn't post your calculation, and I am guessing it does not reference any fields. Perhaps you would be better served by a Number field, populated by a script?

Share this post


Link to post
Share on other sites

Hi Comment

As usual I think you are right. - the calculation is referring to the URL 

anyway here is the calculation I am using.

 

GPOcode is the object with the "address of the web viewer" 

 

Let([A=GetLayoutObjectAttribute ( "GPOcode" ; "content");

 
A=Substitute(A;
[Char(13);""];
[Char(10);""]);
 
A=Substitute(A;
["<div class="altroute-rcol altroute-info"> <span>";"¶"];
["</span>,<span>";"¶"]);
A=GetValue(A;2);
A=Substitute(A;"<";"¶")];
GetValue(A;1)
)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    MikeKD 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.