Skip to content

Instantly share code, notes, and snippets.

@cenkersisman
Last active September 6, 2019 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cenkersisman/2dc5bfc89271ba1d1abe08ea01fa395c to your computer and use it in GitHub Desktop.
Save cenkersisman/2dc5bfc89271ba1d1abe08ea01fa395c to your computer and use it in GitHub Desktop.
SORU: cmdsearchlocations
SABLON: cmdsearchlocations ({HER})
CEVAP:
{!SET koordinatlarim={!RET koordinatlarım!}!}
{!SET $data={!RET cmdfetchjsonforlocation {HER}!}!}
{!SET $array={!RET cmdgetjsonvalue cr,$data!}!}
{!SET $staArraySize={!RET cmdgetjsonarraysize ,$array!}!}
{!FOR $i=0,$staArraySize
{!SET $row={!RET cmdgetjsonarray ,$i,$array!}!}
{!RET cmdgetjsonvalues jsonelement,$row!}
<img src=https://static-maps.yandex.ru/1.x/?lang=tr_TR&ll={!GET $jsonelement[LNG]!},{!GET $jsonelement[LAT]!}&size=468,60&z=8&l=map&pt={!GET $jsonelement[LNG]!},{!GET $jsonelement[LAT]!},vkgrm>
<b>{!GET $jsonelement[NAME]!}</b><br>
{!SET cy={!GET $jsonelement[CY]!}!}
{!SET btype={!GET $jsonelement[BTYPE]!}!}
{!SET ph={!GET $jsonelement[PH]!}!}
{!IF $cy!=??
{!GET $jsonelement[CY]!}/{!GET $jsonelement[PC]!}<br>::!}
{!IF $btype!=??
{!GET $jsonelement[BTYPE]!}<br>::!}
{!IF $ph!=??
Tel: {!GET $jsonelement[PH]!}<br>::!}
{!RET cmdshownavigationbutton {!GET koordinatlarim!},{!GET $jsonelement[LAT]!},{!GET $jsonelement[LNG]!}!}
<hr>
{!SET $i+=1!}
!}
<br><small>Kaynak: Google.com</small>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment