implementasi web servis google map

Upload: munawir-mamuri

Post on 01-Mar-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/26/2019 Implementasi Web Servis Google Map

    1/28

    IMPLEMENTASI WEB SERVICE

    DANGOOGLE MAP

  • 7/26/2019 Implementasi Web Servis Google Map

    2/28

    PERMASALAHAN

    Membangun sistem pencarian lokasi fasilitas

    umum terintegrasi yang terhubung dengan

    beberapa sistem informasi yang berada di lain

    server

    Hasil pencarian berupa visualisasi peta

    pada google map dengan kooordinat

    tertentu yang menun!ukan lokasi pencarian

    "agaimana cara membangun aplikasi #eb

    service sederhana tersebut dengan menggunakan

    PHP NuSoap sebagai pustaka #eb service$nya%

  • 7/26/2019 Implementasi Web Servis Google Map

    3/28

    S&'() *AS'S

    Akan dibangun beberapa sistem aplikasi fasilitasumum +dapat berupa dinas, atau organisai- yang

    menyediakan data, dibuat service berupa nama,

    !enis fasilitas umum +sekolah, hotel, rumah

    sakit, bank, dll- Sistem ini dapat dikatakan

    sebagai provider +penyedia layanan-, danselan!utnya di sebut server

    *emudian dibangun aplikasi client untuk

    melakukan melakukan re.uest ke masing$masing

    sistem server +penyedia service- berdasarkanparameter tertentu

    Aplikasi ketiga berupa aplikasi untuk

    menampilkan hasil pencarian melalui visualisasi

    dengan google map lokasi yang berhasil

  • 7/26/2019 Implementasi Web Servis Google Map

    4/28

    S/L'S) 0

    Solusi studi kasus akan di bagi men!adi 1

    &ahapan, yaitu 0

    2- Merancang Arsitektur Sistem

    3- Merancang dan Membuat Struktur (atabase4&abel

    5- Membuat Script 6eb Service Server +6S(L-

    7- Membuat Script 6eb Service 8lient

    1- 9isualisasi dengan :oogleMap

  • 7/26/2019 Implementasi Web Servis Google Map

    5/28

    ARS)&E*&'R S)S&EM

  • 7/26/2019 Implementasi Web Servis Google Map

    6/28

    MERAN8AN:

    (A&A"ASE (atabase untuk salah satu sistem +contoh- 0 (atabase Engine 0 MyS;L

    (atabase Navigator 0 PhpMyAdmin

    Struktur (atabase 4 &able (atabase Name 0 db#smap

    &able Name 0 tbldinkes

    Nama Field Type Data Nullable Co!t"ait #Ide$

    )d )nt+2

  • 7/26/2019 Implementasi Web Servis Google Map

    7/28

    CREATE TABLE `tbldinkes` (

    `id` int(11) NOT NULL auto_increment

    `kode` !arc"ar(1#) NOT NULL

    `nama` !arc"ar(1##) NOT NULL

    `$enis` !arc"ar(1##) de%ault NULL

    `alamat` !arc"ar(1##) de%ault NULL

    `lon&itude` %loat(1') NOT NULL

    de%ault R*+AR, -E, (`id`)

    UN*.UE -E, `kode` (`kode`)

    /#0#########/

    ) EN*NE2+3*4A+ 5E6AULT C7AR4ET2latin1 AUTO_*NCRE+ENT2# 8

    `ka9asitas` bi&int(:#) NOT NULL de%ault /#/

    `;ebsite` !arc"ar(1##) de%ault NULL

    `latitude` %loat(1') NOT NULL de%ault /#0#########/

  • 7/26/2019 Implementasi Web Servis Google Map

    8/28

    MEM"'A& SER9)8E +PA(A

    SER9ER

    -*ebutuhan 0 Bampp +Apache, PHP,

    MyS;L-

    Library NuS/AP

    "agan *omunikasi Script

  • 7/26/2019 Implementasi Web Servis Google Map

    9/28

    S%"ipt &ete"a'a Depede!i

    inde=php Halaman )nde= 6eb Service+Penyedia 6S(L-

    nusoapphp,dbCconfigphp,

    #sCserverphpnusoapphp Library NuSoap

    dbCconfigphp *onfigurasi *oneksi ke(atabase MyS;L

    #sCserverphp Script 6eb Service Server nusoapphp,

    dbCconfigphp

  • 7/26/2019 Implementasi Web Servis Google Map

    10/28

    S8R)P& +)N(EBPHP-

    >$ust %or sim9le securit3 ? all 9"9 %iles

    must called %rom inde@09"9

    de%ine ( /+U4T_6RO+_*N5E/

    /4A+LE_4_4ERER/ )8

    >>load nusoa9 librar3

    reDuire

    /00>lib>nusoa909"9/8

    >>load db con%i&uration

    reDuire/db_con%i&09"9/8

    >>run ;s ser!er

    reDuire /;s_ser!er09"9/8

    =

  • 7/26/2019 Implementasi Web Servis Google Map

    11/28

    Penyedia Service 0

    6sCserverphp

    @orm Entri 0

  • 7/26/2019 Implementasi Web Servis Google Map

    12/28

    'ntuk mendapatkan

    *oordinat 0 :PS +:lobal Posisioning System- :oogle Map +#ikimapia-, didapatkan koordinat

    (MS +(egree Minute Second-, kemudian di

    konversi ke (ecimal (egree-

    Latitude 0 ( D +M4

  • 7/26/2019 Implementasi Web Servis Google Map

    13/28

    8/N&/H */N9ERS)

    Lo'itude ( ) * +,-o.,/0,1 BT

    Latitude ( 2 * -o3,/,,1

    LS

    2o F

  • 7/26/2019 Implementasi Web Servis Google Map

    14/28

    ? F o3

  • 7/26/2019 Implementasi Web Servis Google Map

    15/28

    Hasil

    Service

  • 7/26/2019 Implementasi Web Servis Google Map

    16/28

    MEM"'A&APL)*AS)

    8L)EN&

    "agan *omunikasi

    Script

    S%"ipt &ete"a'a Depede!i

    inde=php Halaman )nde= 6eb #sCclientphp

    nusoapphp Library NuSoap

    #sCclientphp Script 6eb Service 8lient nusoapphp

  • 7/26/2019 Implementasi Web Servis Google Map

    17/28

    )N(EBPHP

  • 7/26/2019 Implementasi Web Servis Google Map

    18/28

  • 7/26/2019 Implementasi Web Servis Google Map

    19/28

    >>include nusoa9 librar3

    reDuire

    /000>lib>nusoa909"9/8

    >>;sdl con%i&uration

    F;sdl 2 /"tt9>>local"ost>T-7?4>;sma9>ser!er>inde@09"9=;sdl/8

    >>create instance

    F;s_client 2 ne; nusoa9_client

    ( F;sdl

    >>debu& i% needed>>F;s_client?debu&Le!el 2 18

    >>"eader con%i&uration

    Fuser 2 I;sclientI8

    F9ass 2 IsecretI8

    true )8

    http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-http://localhost/TKH-
  • 7/26/2019 Implementasi Web Servis Google Map

    20/28

    >>encr39t "eader !alue

    e@it ( Ferr )8 MMM

    F9ass 0 /ass;ord

    Aut"4oa97eader/8>>set "eader

    F;s_client?set7eaders ( F"eader )8

    >> 6unction to 9rint 6ault

    %unction detect_%ault()

    &lobal F;s_client8

    >>detect %ault and error i% (F;s_client?%ault) e@it ( F;s_client?%aultstrin& )8

    M else

    Ferr 2 F;s_client?&etError ()8

    i% (Ferr)

    Fuser 2 base'_encode ( Fuser )8F9ass 2 base'_encode ( F9ass )8

    F"eader 2 /

  • 7/26/2019 Implementasi Web Servis Google Map

    21/28

    >>6unction to Ec"o 5ebu& Result

    %unction ec"o_debu&()

    &lobal F;s_client8

    ec"o I>9arameters con%i&uration

    F9arams 2 arra3 (/9_ke3_searc"/ 2

    F9_ke3_searc" /9_9a&e/

    2 F9_9a&e /9_9a&e_siPe/ 2F9_9a&e_siPe )8

    >>call met"od ser!ice

    F;s_data 2 F;s_client?call ( /&et5ata5inkes/ F9arams)8

    detect_%ault ()8>>decode data

    return F;s_data8M=

  • 7/26/2019 Implementasi Web Servis Google Map

    22/28

    HAS)L RE;'ES& 8L)EN&

  • 7/26/2019 Implementasi Web Servis Google Map

    23/28

    9)S'AL)SAS) (EN:AN ://:LE MAP

    *ebutuhan 0Apache, PHP

    :oogleMap AP)

    *oneksi )nterner +mapsgooglecom-

    "agan *omunikasi Script

  • 7/26/2019 Implementasi Web Servis Google Map

    24/28

    &ete"a'a Depede!i

    S%"ipt

    inde=php Halaman )nde= 6eb #scClokasiphp

    6scClokasiphp Script :enerate BML datauntuk :oogle Map dari data#eb service +client-

    #sCclientphp

    #sCclientphp Script 6eb Service 8lient nusoapphp

  • 7/26/2019 Implementasi Web Servis Google Map

    25/28

    S8R)P& :MAP

    )nde=php

    6scClokasiphp

  • 7/26/2019 Implementasi Web Servis Google Map

    26/28

    HAS)L ://:LEMAP

  • 7/26/2019 Implementasi Web Servis Google Map

    27/28

    HAS)L PEN8AR)AN

  • 7/26/2019 Implementasi Web Servis Google Map

    28/28

    PR/>E8& "ESAR +3-

    Arsitektur

    WS

    Cliet

    4

    Goo'le5Map

    WSSe"6e"

    7&lp +8

    WS

    Se"6e"

    7&lp 08

    WS

    Se"6e"

    7&lp 38

    WS

    Se"6e"

    7&lp 98

    WS

    Se"6e"

    7&lp 98