It is currently Wed Jul 17, 2019 5:34 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Geolocation via WebGadget
PostPosted: Mon Sep 26, 2016 7:30 pm 
Offline
User
User
User avatar

Joined: Wed Mar 15, 2006 9:40 am
Posts: 98
Location: Germany
Hi JHPJHP,

it is the same like bevor.
I have no problem to try other ways. I like to make it run too.

googleapis.com is working nearly complete.
Only the images for the control elements over the map are missing, the element left bottom do not work and
if I keep left mouse-button down on the upper right element the cursur change to a cross-arrow after move and it marks all streets in france (not in germany - my IP-address routes to the same as 87.173.66.100).
I did try some things, but it is always the same.

And now it becomes crazy:
After this i have tried it in VB VM's. Under Win7 x64 and Win10 x64 the map works fine. But the button in toolbar have no images.

_________________
Please pardon my English, my native tongue is German.


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Mon Sep 26, 2016 8:29 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi uweb,

If you haven't already done so, please download the latest version of Geolocation via WebGadget.

If you're still seeing a problem you may have a setting, firewall, etc. affecting the output.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Tue Sep 27, 2016 11:30 am, edited 6 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Mon Sep 26, 2016 9:57 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1692
Location: Germany (Saxony, Deutscheinsiedel)
Very well done, thank you very much for this nice piece of code! :mrgreen:

(Works without any problems for me on Win10 x64, on MacOS not tested yet...)

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Mon Sep 26, 2016 10:51 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi Andre,

You are most welcome.

Thank you for reporting your results.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Tue Sep 27, 2016 12:01 am 
Offline
User
User
User avatar

Joined: Wed Mar 15, 2006 9:40 am
Posts: 98
Location: Germany
Hi JHPJHP,

http://www.webformation.de/Geolocation/Geolocation_001.PNG
Geolocation.pb: Do not show a bouncing red marker, but the blue transparent circle.
- hovering over the Marker show a tooltip containing the locations IP address
- Left-Mouse-Click the Marker show an Info-Window with additional information. The [x] inside it works, but is invisible.
Now I see : I have the same problem in the PB-IDE at one point.

http://www.webformation.de/Geolocation/Geolocation_002.PNG
Geolocation_Directions.pb: Show a red and green Marker.
- hovering over the Marker do not show a tooltip containing the location names
- Left-Mouse-Click the Marker should show an Info-Window with additional information
- Left-Mouse-Click the Marker show an Info-Window with additional information. The [x] inside it works, but is invisible.

http://www.webformation.de/Geolocation/Geolocation_003.PNG
Geolocation_TwoPoints.pb: Do not show a red and green Marker and there is no funktion with (not nonly invisible).

The firewall sounds like a good idea. But inside the VirualBox Virtual Mashines (on the same PC) the map works. There are missing images in the toolbar.
I will check it anyway.
Thank you.

_________________
Please pardon my English, my native tongue is German.


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Tue Sep 27, 2016 12:37 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi uweb,

Thank you for the additional information.

Either replace the top part of geolocation.pbi with the following, or download the latest version of Geolocation via WebGadget:
- other content options: IE=9 :: IE=11 :: IE=EmulateIE9 :: IE=EmulateIE11
Code:
Geolocation = "<!DOCTYPE html>" + #LF$ +
              "<html lang='en'>" + #LF$ +
              #TAB$ + "<head>" + #LF$ +
              #TAB$ + #TAB$ + "<meta http-equiv='content-type' content='text/html; charset=utf-8'>" + #LF$ +
              #TAB$ + #TAB$ + "<meta http-equiv='X-UA-Compatible' content='IE=edge'/>" + #LF$ +
              #TAB$ + #TAB$ + "<meta name='viewport' content='width=device-width, initial-scale=1'>" + #LF$ +
              #TAB$ + #TAB$ + "<title>IP-API / Google Maps: Geolocation</title>" + #LF$ +

If you're still having issues, try changing the following setting from the IE menu:
- Tools -- Compatibility View settings -- Display intranet sites in Compatibility View: Unchecked

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Tue Sep 27, 2016 6:54 am 
Offline
User
User
User avatar

Joined: Wed Mar 15, 2006 9:40 am
Posts: 98
Location: Germany
Hi JHPJHP,

with this it is still have the same.
But I have tried different because it is more and more clear that i have a problem with my system.
I use it since three years, have tested a lot of things and did only use CCleaner. My VM's are very new and clean.

Instead of compiling normal and test in the VM I did compile now in the VM.
The resulting Exe works in the VM without any problems.
In my normal system I have still the same problems plus the missing toolbar-images with this Exe.

Thank you very much and sorry for the lot of needless work.
It realy looks like it was only my system.

_________________
Please pardon my English, my native tongue is German.


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Tue Sep 27, 2016 11:13 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi uweb,

uweb wrote:
It realy looks like it was only my system.

No Problem, thank you for the confirmation.

I've updated Geolocation via WebGadget, returning the include files to their original state.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Thu Jan 26, 2017 6:06 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Wed Sep 28, 2016 12:24 pm 
Offline
User
User

Joined: Fri Mar 29, 2013 4:55 pm
Posts: 90
Location: Netherland
Hi JHPJHP,

Is it possible to take out directions (right side)?

Little_man


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Wed Sep 28, 2016 6:11 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi Little_man,

The easiest way would be to set the Panel DIV style to none.

I've updated Geolocation via WebGadget to include a CheckBoxGadget to demonstrate this.

NB*: With some simple JavaScript the DIV Panel could be made to slide in and out of view.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Wed Sep 28, 2016 7:19 pm 
Offline
User
User

Joined: Fri Mar 29, 2013 4:55 pm
Posts: 90
Location: Netherland
Hi JHPJHP,

Is it possible to take out directions (right side)? --> Thanks for the solution (CheckBoxGadget).
And it is possible to store this information in a file?

Little_man


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Wed Sep 28, 2016 8:05 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi Little_man,

Using a modified version of the quick method from the first post, directions can be returned in either an XML or JSON format:
Code:
InitNetwork()
Debug PeekS(ReceiveHTTPMemory("http://maps.google.com/maps/api/directions/xml?origin=Toronto&destination=Mount+Rushmore"), -1, #PB_UTF8)

NB*: Updated the first post to include the above quick method.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Wed Sep 28, 2016 8:25 pm 
Offline
User
User

Joined: Fri Mar 29, 2013 4:55 pm
Posts: 90
Location: Netherland
Hi JHPJHP,

Thanks for this information.

Little_man


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Sun Oct 02, 2016 3:44 pm 
Offline
New User
New User

Joined: Thu Mar 12, 2015 2:07 pm
Posts: 6
Hi JHPJHP,

this is wonderful stuff!

Would it not be a good idea to let adresses as an geolocator-input, which have been qualified by Google like in
http://www.purebasic.fr/german/viewtopic.php?f=8&t=29821&p=338276&hilit=google#p338276?


Top
 Profile  
Reply with quote  
 Post subject: Re: Geolocation via WebGadget
PostPosted: Mon Oct 03, 2016 2:01 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi Sooraa,

Thank you for saying so.

Each of the examples demonstrates a unique feature of Google Maps; returning a geo-location from a formatted address is available in two of the examples: Geolocation_Directions.pb and Geolocation_Two_Points.pb.

The example Geolocation_IP_Address.pb was designed to return a geo-location from a web or IP address, as it's not a native function of Google Maps.

Located in the first post is a Quick Method for returning a geolocation, similar to your reference from the German forum; both were posted by the same author.
- http://www.purebasic.fr/german/viewtopic.php?f=8&t=29821
- http://www.purebasic.fr/english/viewtopic.php?f=27&t=66616

The examples were meant only as a guide to what can be achieved with very little code using the WebGadget.

------------------------------------------

Updated:
- renamed 2 examples
-- Geolocation.pb to Geolocation_IP_Address.pb
-- Geolocation _TwoPoints.pb to Geolocation_Two_Points.pb

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye