PureBasic Forum
http://forums.purebasic.com/english/

Geolocation: Google Maps
http://forums.purebasic.com/english/viewtopic.php?f=12&t=66599
Page 2 of 5

Author:  JHPJHP [ Sat Sep 24, 2016 11:56 am ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

Here are a couple things to look at: Geolocation.pb...

1. Does the first line in the ListIconGadget read [ status: success ] ?
2. REM the line [ WebBrowser2\put_Silent(#True) ] in the Procedure BuildMap.

Please let me know the results. Thank you.

Author:  uweb [ Sat Sep 24, 2016 7:20 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi JHPJHP,

Yes, status is success.

With the REM I get a script-error in row 14 :
'google' is undefined
Code: 0
URL : about:blank

I did test https://developers.google.com/maps/documentation/javascript/examples/?hl=de and the Samples do working in my IE11.

Author:  JHPJHP [ Sat Sep 24, 2016 8:27 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

Geolocation.pb:
- it might be that MarkerText contains an invalid character; temporarily replace MarkerText with Double-Quotes in the Procedure SetScript.
Code:
"['" + MarkerText + "'," + Latitude + "," + Longitude + "]"

"['" + "" + "'," + Latitude + "," + Longitude + "]"

Author:  uweb [ Sat Sep 24, 2016 8:52 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi JHPJHP,

no, unchanged.

Author:  JHPJHP [ Sat Sep 24, 2016 8:58 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

I've uploaded a new version of Geolocation via WebGadget, pointing the Include files (geolocation.pbi, etc.) to an alternate source script. Please let me know it this solves the problem.
Code:
"<script src='https://maps.googleapis.com/maps/api/js?v=3&sensor=false' type='text/javascript'></script>"

If it still doesn't work, try changing https to http.

Thank you.

Author:  uweb [ Sat Sep 24, 2016 9:52 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi JHPJHP,

sorry for the long time. I have visitors.

In comination with REM the line [ WebBrowser2\put_Silent(#True) ] I get now a message witch ask for execute the skript even though problem with saftey certificate.
If I choose Yes it works.

Author:  JHPJHP [ Sat Sep 24, 2016 9:56 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

Thank you for working this out with me; whenever you have time is very much appreciated.

Have you tried changing https to http in the file Includes/geolocation.pbi?
Code:
"<script src='https://maps.googleapis.com/maps/api/js?v=3&sensor=false' type='text/javascript'></script>"

Author:  uweb [ Sat Sep 24, 2016 10:16 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi JHPJHP,

I thank you.
With http in place of https I get the same script-error like at the begin.

May I have to change the configuration of the IE.
I will try this tomorow.

Author:  JHPJHP [ Sat Sep 24, 2016 10:43 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

There are many supported URL source script variations.
- so far all versions have worked on my Windows 10 and OSX computers without modification or prompt

I've uploaded a new version of Geolocation via WebGadget, pointing the Include files (geolocation.pbi, etc.) to an alternate source script. Please let me know it this solves the problem.
Code:
"<script src='https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false' type='text/javascript'></script>"

If it still doesn't work, try using the following URL:
Code:
https://maps.google.com/maps/api/js?v=3.5&sensor=false

Thank you.

Author:  uweb [ Sun Sep 25, 2016 6:37 am ]
Post subject:  Re: Geolocation via WebGadget

Hi JHPJHP,

it is the same with both.

With
Code:
#TAB$ + #TAB$ + "<script>if (navigator.geolocation) { var BrowserVersion = navigator.appVersion; window.clipboardData.setData('Text', BrowserVersion); alert(BrowserVersion); }</script>" + #LF$ +
I get
Quote:
5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko



edit:
After insert the corresponding Domain (in my case : https://maps.google.com) to the trustworthily Sites in IE it works perfekt.

Thank you JHPJHP for your help and all your greate shared work!!!

PS
If you are looking for new challenge: Dokany (rebirth of dokan) is still waiting for a PB-Coder with more knowledge as my.
It offers more abilitys as ImDisk and in the meantime it is a signed Windows driver.
For example it would be posible to provide database-content dynamically as filesystem.

Author:  JHPJHP [ Sun Sep 25, 2016 6:20 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

Thank you for reporting the issue and solving the problem :) I've added a note to the first post.

dokan-dev/dokany looks very interesting...

Author:  uweb [ Sun Sep 25, 2016 7:17 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi JHPJHP,
I am sorry but I must cancel my solution.
Today in the morning it works. I am sure.
But now I get the message, witch ask for execute the skript even though problem with safety certificate, again.
I have tryed to reproduce the situation in the morning. But I am not able to make it work without this message.

Author:  JHPJHP [ Sun Sep 25, 2016 8:22 pm ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

Previously I modified the URL from maps.google.com to maps-api-ssl.google.com, could it be that the Trusted sites URL doesn't match the include file?

I've updated Geolocation via WebGadget with the original URL maps.google.com.

Author:  uweb [ Mon Sep 26, 2016 7:17 am ]
Post subject:  Re: Geolocation via WebGadget

Hi JHPJHP,

probable this thought was the reason that I did changed yesterday falsely the include to 'https://maps.google.com'.

Now booth works with the Trusted sites 'https://maps.google.com' or 'https://maps.googleapis.com'. There is no difference.
Code:
              ;#TAB$ + #TAB$ + "<script src='https://maps.googleapis.com/maps/api/js?v=3&sensor=false' type='text/javascript'></script>" + #LF$ +
              #TAB$ + #TAB$ + "<script src='https://maps.googleapis.com/maps/api/js?v=3.5&sensor=false' type='text/javascript'></script>" + #LF$ +

But it works without the images for the control elements over the map. There are only the placeholder ([x] left and middle - white area right).
Probably it was working yesterday also without them and i did not notice it.

Author:  JHPJHP [ Mon Sep 26, 2016 8:03 am ]
Post subject:  Re: Geolocation via WebGadget

Hi uweb,

Can you please try one last thing; download the latest version: Geolocation via WebGadget...

Before running the examples do the following:
- Internet Options -- General -- Delete
- Internet Options -- Security -- Trusted sites -- Sites
-- remove all entries, if it fails only add https://maps.googleapis.com
- Internet Options -- Security -- Reset all zones to default level
- Internet Options -- Advanced -- Restore advanced settings

Thank you :!:

Page 2 of 5 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/