Map url in Browser Widget

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Map url in Browser Widget

Pi Digital via use-livecode
I currently put the following URL into my browser widget and it works ok but
does anyone know what needs to be added to the code in order to place a
"marker" into the map location?  I want the user to see the exact location
of where they are located.  I get the Lat / Long from the
"mobilecurrentlocation" command.

 

This is what I generate now:

https://www.google.com/maps/@45.829321,-109.904418,10z

Thanks.

 

Mike

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Map url in Browser Widget

Pi Digital via use-livecode
> Mike wrote:
> ... does anyone know what needs to be added to the code in order to place a
> "marker" into the map location? ...
> This is what I generate now:
> https://www.google.com/maps/@45.829321,-109.904418,10z

http://maps.google.com/maps?q=45.829321,-109.904418&z=10&t=h

The t=h is for a hybrid view

Another example, for a text query:
https://www.google.com/maps?q=rm+kerner+company&z=10&t=h

Most of this works (scroll the page halfway down):
https://moz.com/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Map url in Browser Widget

Pi Digital via use-livecode
In reply to this post by Pi Digital via use-livecode
The examples of my last post show a marker but ignore the initial zoom.
The following shows the marker and also respects the zoom (1-19).
(Tested on desktop only).

on mouseUp
  put 8 into z
  put 45.829321 into la
  put -109.904418 into lo
  set url of widget "browser" to \
    merge("https://www.google.com/maps/place/[[la]],[[lo]]/@[[la]],[[lo]],[[z]]z")
end mouseUp

> (removed in examples zoom as it doesn't work):
>

> > Mike wrote:
> > ... does anyone know what needs to be added to the code in order to place a
> > "marker" into the map location? ...
> > This is what I generate now:
> > https://www.google.com/maps/@45.829321,-109.904418,10z
>
> http://maps.google.com/maps?q=45.829321,-109.904418&t=h
> The t=h is for a hybrid view
>
> Another example, for a text query:
> https://www.google.com/maps?q=livecode+edinburgh&t=h

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode