locations
This commit is contained in:
parent
fe8ef287aa
commit
58675d5509
|
@ -1,7 +1,36 @@
|
|||
status.command({
|
||||
name: "location",
|
||||
description: "Send location",
|
||||
color: "#9a5dcf"
|
||||
color: "#9a5dcf",
|
||||
preview: function (params) {
|
||||
var text = status.components.text(
|
||||
{
|
||||
style: {
|
||||
marginTop: 5,
|
||||
marginHorizontal: 0,
|
||||
fontSize: 14,
|
||||
fontFamily: "font",
|
||||
color: "black"
|
||||
}
|
||||
}, params.value);
|
||||
var uri = "https://maps.googleapis.com/maps/api/staticmap?center="
|
||||
+ params.value
|
||||
+ "&size=100x100&maptype=roadmap&key=AIzaSyBNsj1qoQEYPb3IllmWMAscuXW0eeuYqAA&language=en"
|
||||
+ "&markers=size:mid%7Ccolor:0xff0000%7Clabel:%7C"
|
||||
+ params.value;
|
||||
|
||||
var image = status.components.image(
|
||||
{
|
||||
source: {uri: uri},
|
||||
style: {
|
||||
width: 100,
|
||||
height: 100
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return status.components.view({}, [text, image]);
|
||||
}
|
||||
}).param({
|
||||
name: "address",
|
||||
type: status.types.TEXT,
|
||||
|
|
Loading…
Reference in New Issue