Hmm, I must have spoken too soon. This actually works!
on mouseUp
put mapURL() into tURL
put URL tURL into x
put x into image "myGMap"
end mouseUp
function mapURL
put
"https://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&key=AIzaSyCO423QzwaEEBmiw4XjPKzz4Tcg_5bjHv4"
into retURL
return retURL
end mapURL
> On Apr 27, 2017, at 3:36 PM, Bob Sneidar via use-livecode
> <[email protected]> wrote:
>
> Here is how I get directions in a map:
>
> on mouseUp pMouseBtnNo
> put
> "https://www.google.com/maps/dir/12150+Mora+Dr,+Santa+Fe+Springs,+CA+90670,+USA/"
> into theURL
> put the dgHilitedLine of group "dgSites" into theHilitedLine
> put the dgDataOfLine [thehilitedline] of group "dgSites" into aRecordData
> put urlencode(aRecordData["addr1"]) & "+" & \
> urlencode(aRecordData["city"]) & "+" & \
> urlencode(aRecordData["state"]) & "+" & \
> urlencode(aRecordData["zip"]) into theAddress
> set the clipboarddata to \
> aRecordData["addr1"] & space & \
> aRecordData["city"] & space & \
> aRecordData["state"] & space & \
> aRecordData["zip"]
> put theURL & urlencode(theAddress) into theURL
> launch url theURL
> end mouseUp
>
> Note I have hardcoded the start location into the URL, but that can be dealt
> with easy enough. Also I am pullign data from a datagrid, but that also can
> be sussed out easily enough. This *should* work in a browser object, no?
>
> Bob S
>
>
>
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode