Skip to content
Home » [NEW] วิธีใช้ React ร่วมกับ Map API สร้างแผนที่ออนไลน์อย่างง่าย | save หมาย ถึง – NATAVIGUIDES

[NEW] วิธีใช้ React ร่วมกับ Map API สร้างแผนที่ออนไลน์อย่างง่าย | save หมาย ถึง – NATAVIGUIDES

save หมาย ถึง: คุณกำลังดูกระทู้

React เป็น JavaScript Framework อีกหนึ่งตัวที่โด่งดัง และใช้กันอย่างแพร่หลาย โดยในบทความนี้ จะอธิบายถึงวิธีการที่ใช้ React ร่วมกับแผนที่ออนไลน์อย่าง Longdo Map API สำหรับการสร้างเว็บไซต์ที่ต้องมีส่วนประกอบของแผนที่ เหมือนกับที่เราสามารถ ใช้ Longdo Map API ร่วมกับ Vue.js ได้นั่นเอง

ดูฉบับเต็มได้ที่ Longdo Map’s Github

วิธีการใช้ มีด้วยกัน 3 ขั้นตอน ดังนี้

  1. สมัครคีย์ Longdo Map API
  2. ดาวน์โหลดไฟล์ LongdoMap.js
  3. เรียกใช้ Map API ใน src/App.js

1. สมัครคีย์ Longdo Map API

อันดับแรก นักพัฒนาต้องมี KEY API สำหรับเรียก API ก่อน สมัครฟรีได้ที่ Longdo Map API key.
ท่านจะได้คีย์ยาวๆ มา เช่น

5e3612dcbfa88a77bf9cc67xxxxxxxxx

2. ดาวน์โหลดไฟล์ LongdoMap.js

นักพัฒนาต้อง copy ไฟล์ LongdoMap.js ไปวางยัง folder ที่ต้องการ

ในที่นี้ผมวางไฟล์ไว้ที่ ./src/longdo-map/LongdoMap ครับ

3. เรียกใช้ Map API ใน src/App.js

นักพัฒนาสามารถ copy โค้ดชุดด้านล่างนี้ ไปใช้ได้เลย (อย่าลืมเปลี่ยน key api)

import React, { Component } from 'react';
import './App.css';
import { longdo, map, LongdoMap } from './longdo-map/LongdoMap';
//replace a LongdoMap.js file

class App extends Component {

  initMap(){
    map.Layers.setBase(longdo.Layers.GRAY);
  }

  render() {
    const mapKey = '5e3612dcbfa88a77bf9cc67xxxxxxxxx'
    return (
      <div className="App">
        <LongdoMap id="longdo-map" mapKey={mapKey} callback={this.initMap} />
      </div>
    );
  }
}

export default App;
  • id (required) -> HTML id ที่ใช้แสดงแผนที่
  • mapKey(required) -> Longdo Map Key API ที่สมัคร
  • callback -> Callback function after a map is initialized, use this for map customiztion

 ผลลัพธ์

react map apiภาพแสดงหน้าจอ ที่แสดงผล Map API ด้วย React.js

Longdo Map Javascript API Reference

ท่านสามารถใช้คำสั่ง การปักหมุด (Marker) , การวาดรูปทรง (Geometry) , การค้นหาเส้นทาง (Routing) ได้จากคู่มือ https://map.longdo.com/docs

สรุป

จากที่กล่าวมาทั้งหมดข้างต้น การพัฒนาทางเทคนิคโดยใช้ JavaScript API ร่วมกับ React ที่ไม่ยากนัก แต่ผลลัพธ์และการแสดงผลที่ได้สามารถนำไปประยุกต์ต่อได้อีกมากมาย
หากท่านใดสนใจและมีโจทย์ที่ต้องใช้แผนที่ร่วมกับ Web หรือ Mobile Application เราแนะนำให้ศึกษาละเอียดๆ ได้ที่ map.longdo.com/products ครบถ้วน ทุกกระบวนท่า : )

Longdo Map เราเป็นแผนที่ออนไลน์คนไทย ที่มีความตั้งใจ อยากให้ธุรกิจ/หน่วยงานต่างๆ ของประเทศไทย ได้ใช้เทคโนโลยีภูมิสารสนเทศ (GIS) เพื่อเสริมความแข็งแกร่ง แข่งขันกับต่างชาติได้ ด้วยต้นทุนที่ไม่สูงเท่าแผนที่เจ้าอื่นในตลาด

ทั้งนี้ นักพัฒนาสามารถสมัครคีย์ฟรีได้ถึง 100,000 transactions/เดือน ซึ่งเพียงพอต่อการใช้ได้ระดับนึงเลยครับ

Facebook Notice for EU!
You need to login to view and post FB Comments!

[Update] ลูกคุณช่างน่ารักน่าชังซะจริงจริ๊ง!(Your child is so cute!) | save หมาย ถึง – NATAVIGUIDES

Your child is so cute!

Explanation (อธิบาย)

ถ้าเป็นเด็กหลายคนต้องพูดว่า

คำว่า cute ใช้กับคนที่ดูเก๋ได้เช่นกัน ปัจจุบันมีคนถ่ายรูปหน้าแอ๊บแบ๊วลง

 “ว้าว เธอช่างดูเก๋ซะจริงจริ๊ง! Wow, how she is so cute!”

หรือ

How so cute you are! แหม๋ ทำไมคุณถึงช่างน่ารักจังเลยน่ะ!

beautiful กับ cute แตกต่างกันนะครับ
beautiful หมายถึง สวยงาม เหมาะที่จะใช้ผู้หญิงสวยแบบเรียบร้อย ดอกไม้ หรือเสื้อผ้าอย่างนี้เป็นต้นครับ

!”

ช่วงเฉลย “ตอบถูก ได้100!”

 a. 

 b. 

 c. 

Click! .

👉

 : 

ลิ้งค์แนะนำ คลิก 

👉

 : 

Miss you all, see you soon.

Bye,

Thanks for reading.

Posted by:

I’ve known, then I’ve grown.

Vocabulary | คำศัพท์

Pronunciation | คำอ่าน

Translate to English | แปล

Are อาร์ เป็น อยู่ คือ
Baby เบบี้ เด็ก ที่รัก
Beautiful บิวตี้ฟูล สวย
Children ชิลเดร็น เด็กๆ
Cute คิวท น่ารักน่าเอ็นดู
Dealing ดีลลิ่ง จัดการ
Her เฮอร์ หล่อน
How ฮาว อย่างไร
Is อิส เป็น อยู่ คือ
Kid คิด เด็ก
Me มี ฉัน
Naughty นอตี้ ซุกซน
Please พลีส กรุณา โปรดเถอะ
Pretty เพรตตี้ งดงาม
She ชี หล่อน
So โซ ดังนั้น
Tell เทล บอก
The เดอะ อติเคิลนำหน้านามเฉพาะ
Those โดส เหล่านั้น
To ทู ถึง
Very เวรี่ อย่างมากมาย แท้จริง เฉพาะ
With วิท ร่วมกับ กับ
Wow ว้าว ว้าว คำอุทาน
You ยู ท่าน
Your ยัวร์ ของท่าน

    เวลาที่เราเห็นเด็กหน้าตาน่ารักน่าชัง อยากจะพูดชมเชยกับพ่อแม่ของเด็กใช้คำนี้ได้เลยครับถ้าเป็นเด็กหลายคนต้องพูดว่าคำว่า cute ใช้กับคนที่ดูเก๋ได้เช่นกัน ปัจจุบันมีคนถ่ายรูปหน้าแอ๊บแบ๊วลง facebook instagram หรือ social network ต่างๆ เราเห็นแล้วรู้สึกว่าโดนอย่างแรงก็เลยอุทานออกมาว่าหรือbeautiful กับ cute แตกต่างกันนะครับbeautiful หมายถึง สวยงาม เหมาะที่จะใช้ผู้หญิงสวยแบบเรียบร้อย ดอกไม้ หรือเสื้อผ้าอย่างนี้เป็นต้นครับลิ้งค์แนะนำ คลิกลิ้งค์แนะนำ คลิกMiss you all, see you soon.Bye,Thanks for reading.


    น้องใยไหม | มีน้องใหม่ เล่นกับน้องในท้องแม่ Kids Paint Color with Her Pregnant Mommy!|


    ใยไหม ใยไหมชวนเล่น ZaneeTube ใยไหมใยบัว
    【Contact สนใจติดต่อโฆษณา รีวิวสินค้าหรือสปอนเซอร์】
    ►EMail : [email protected]
    Mr. BAT Fun Family (คุณแบท)

    นอกจากการดูบทความนี้แล้ว คุณยังสามารถดูข้อมูลที่เป็นประโยชน์อื่นๆ อีกมากมายที่เราให้ไว้ที่นี่: ดูความรู้เพิ่มเติมที่นี่

    น้องใยไหม | มีน้องใหม่ เล่นกับน้องในท้องแม่ Kids Paint Color with Her Pregnant Mommy!|

    คิด(แต่ไม่)ถึง [Same Page?] – Tilly Birds |Official MV|


    บางทีการที่ยังอยู่ แต่ไม่มีอะไรเหมือนเดิมแล้ว
    มันก็เจ็บปวดไม่ต่างกับการหายไปเลย…
    เพลง : คิด(แต่ไม่)ถึง [Same Page?]
    ศิลปิน : Tilly Birds
    Lyrics :
    คิดอยู่ทุกวัน คิดอยู่ทุกคืน
    คิดว่าสักวัน ตัวฉันคงถูกลืม
    น้อยลงทุกวัน ที่เราคุยกัน
    เพราะว่าอะไร เธอถึงได้เปลี่ยนไป
    คิด(แต่ไม่)ถึง
    คิด คิด (แต่ไม่) ถึงเธอ
    คิด(แต่ไม่)ถึง
    คิด คิด (แต่ไม่) ถึงเธอ
    เธอรู้บ้างไหม ว่ามีใครทนทุกข์ทรมาน
    อยากรู้เพียง
    ว่าความคิดถึงของเธอกับฉัน
    มันเท่ากันหรือเปล่า
    ถามจริง ๆ ว่าใจเธอเปลี่ยนไปหรือเปล่า
    ฉันไม่คิดไปเองใช่ไหม
    ความคิดถึงที่ฉันได้เคยส่งไป
    ส่งไปไม่เคยถึงเธอเลย
    ยังนึกถึงวันนั้น วันที่เราหัวเราะกัน
    ไม่เคยลืมรอยยิ้มเธอสักครั้ง
    จำได้ไหม วันที่เราทะเลาะกัน
    เธอยังอภัยให้ฉันอยู่ทุกครั้ง
    ทุกความทรงจำยังทำให้ฉัน
    คิด(แต่ไม่)ถึง
    คิด คิด (แต่ไม่) ถึงเธอ
    คิด(แต่ไม่)ถึง
    คิด คิด (แต่ไม่) ถึงเธอ
    เธอรู้บ้างไหม ว่ามีใครทนทุกข์ทรมาน
    อยากรู้เพียง
    ว่าความคิดถึงของเธอกับฉัน
    มันเท่ากันหรือเปล่า
    ถามจริง ๆ ว่าใจเธอเปลี่ยนไป หรือเปล่า
    ฉันไม่คิดไปเองใช่ไหม
    ความคิดถึงที่ฉันได้เคยส่งไป
    ส่งไปได้เพียงในความทรงจำ
    ที่มีเราเรื่อยมา
    แค่นึกภาพตอนนั้น ฉันก็มีน้ำตา
    รู้บ้างไหมว่าเจ็บแค่ไหน
    ความคิดถึงที่ฉันได้เคยส่งไป
    ส่งไปไม่เคยถึงเธอเลย
    (คิดแต่ไม่ถึง คิด คิด แต่ไม่ถึงเธอ)
    ส่งไปไม่เคยถึงเธอเลย
    ถ้าเธอนั้นจะไม่กลับมา
    อยากให้รู้ว่าทุกๆช่วงเวลา
    ไม่เคยไม่คิดถึงเธอเลย
    Tilly Birds
    Vocals : อนุโรจน์ เกตุเลขา l Anuroth Ketlkekha ( IG : 2nd__4th )
    Guitar : ณัฐดนัย ชูชาติ l Nutdanai Chuchat ( IG : billbilly01 )
    Drums : ธุวานนท์ ตันติวัฒนวรกุล l Thuwanon Tantiwattanaworakul ( IG : milomono )
    Music : Tilly Birds
    Lyrics : อนุโรจน์ เกตุเลขา (เติร์ด)
    Arranged by : ธุวานนท์ ตันติวัฒนวรกุล (ไมโล)
    Produced by : ณัฐดนัย ชูชาติ (บิลลี่)
    Samples Recorded at : ทรยศสตูดิโอ
    Additional Singers : อานาปาน ปิ่นประดับ, รวิสรารัตน์ พิบูลภานุวัธน, ณพรัตน์ มั่นสินธร
    Studio Engineered by : ยศทร บุญญธนาภิวัฒน์
    Asst. Engineered by : ภาคิน วัฒนรุกข์
    Vocals Recorded at : Axis Studio
    Engineered by : กร มหาดำรงค์กุล
    Vocals Edited by : กร มหาดำรงค์กุล
    Mixed and Mastered by : Henry Watkins (Karma Sound Studios)
    MV Credits:
    Director Anuroth Ketlekha, SADUST STAYGOLD
    First Assistant Director Sirada Tritruengtassana, Kunatan Limdoo
    Second Assistant Director Nitchakarn Pakpairin
    Producer Nutdanai Chuchat, Wissuta Suksawat
    DOP Chatpol Buawan
    Art Director PERDCHAKDEAW
    Editor SADUST STAYGOLD, Chatpol Buawan
    Colorist Jirayu Jangwattanapong
    Acting Coach Sarun Kaensap
    Makeup Vimvipa Chayangkura
    Catering Napatsawan Mongkolsomboon \u0026 Team
    Cast Chayapat Wiratyosin, Supawan Poolcharoen
    Extras Irin Poontavee, Phurin Kasikun, Johnparot Wongthes, Natachanun Netikornwiwach, Poomtharit Intharit, Araya Laoprachaiwan
    ดาวน์โหลดเพลงนี้ได้ที่ 1230321
    คิดแต่ไม่ถึง TillyBirds GeneLab

    คิด(แต่ไม่)ถึง [Same Page?] - Tilly Birds |Official MV|

    aespa 에스파 ‘Savage’ MV


    aespa’s 1st mini album \”Savage\” is out!
    Listen and download on your favorite platform: https://smarturl.it/ae_Savage
    [Tracklist]
    01 ænergy
    02 Savage
    03 I’ll Make You Cry
    04 YEPPI YEPPI
    05 ICONIC
    06 자각몽 (Lucid Dream)
    Subscribe to aespa Official YouTube Channel!
    https://www.youtube.com/aespa?sub_confirmation=1
    📀SM Global Shop
    https://smglobalshop.com/collections/aespa
    aespa official
    https://www.youtube.com/c/aespa
    https://www.instagram.com/aespa_official
    https://www.tiktok.com/@aespa_official
    https://twitter.com/aespa_Official
    https://www.facebook.com/aespa.official
    https://www.vlive.tv/channel/97CCED
    https://weibo.com/aespa
    aespa 에스파 Savage æspa
    aespa 에스파 ‘Savage’ MV ℗ SM Entertainment

    aespa 에스파 'Savage' MV

    How to save a language from extinction | Daniel Bögre Udell


    Visit http://TED.com to get our entire library of TED Talks, transcripts, translations, personalized Talk recommendations and more.
    As many as 3,000 languages could disappear within the next 80 years, all but silencing entire cultures. In this quick talk, language activist Daniel Bögre Udell shows how people around the world are finding new ways to revive ancestral languages and rebuild their traditions and encourages us all to investigate the tongues of our ancestors. \”Reclaiming your language and embracing your culture is a powerful way to be yourself,\” he says.
    Get TED Talks recommended just for you! Learn more at http://TED.com/signup.
    The TED Talks channel features the best talks and performances from the TED Conference, where the world’s leading thinkers and doers give the talk of their lives in 18 minutes (or less). Look for talks on Technology, Entertainment and Design plus science, business, global issues, the arts and more. You’re welcome to link to or embed these videos, forward them to others and share these ideas with people you know. For more information on using TED for commercial purposes (e.g. employee learning, in a film or online course), submit a Media Request here: http://mediarequests.TED.com
    Follow TED on Twitter: http://twitter.com/TEDTalks
    Like TED on Facebook: http://facebook.com/TED
    Subscribe to our channel: http://youtube.com/TED

    How to save a language from extinction | Daniel Bögre Udell

    Lil Peep – Save That Shit (Official Video)


    Lil Peep \”Save That Shit\” (Official Video)
    From Come Over When You’re Sober (Pt. 1)
    Listen to Come Over When You’re Sober (Pt. 1): http://lilpeep.lnk.to/sober
    Subscribe to the Lil Peep YouTube channel: https://www.youtube.com/channel/UC0gOw4iy6HwO01qgA1B0Q

    Follow Lil Peep
    Website: https://lilpeep.com/
    Instagram: http://instagram.com/lilpeep
    Facebook: http://facebook.com/lilpeepmusic
    Twitter: http://twitter.com/lilpeep
    Spotify: https://open.spotify.com/artist/2kCcBybjl3SAtIcwdWpUe3?si=A6zpaVLSgKrcupqr5ueMQ
    Apple Music: https://music.apple.com/us/artist/lilpeep/1077454941
    Amazon Music: https://music.amazon.com/artists/B01NCBEEBR/lilpeep
    YouTube Music: https://www.youtube.com/channel/UC0gOw4iy6HwO01qgA1B0Q
    Deezer: https://www.deezer.com/en/artist/11420468
    Produced by Smokesac and IIVI
    Video Directed by Mezzy \u0026 Heavy Rayn
    LYRICS:
    [Intro]
    (Yeah)
    [Chorus]
    Fuck my life, can’t save that, girl
    Don’t tell me you could save that shit
    All she want is payback for the way I always play that shit
    You ain’t gettin’ nothin’ that I’m sayin’
    Don’t tell me you is
    Nothin’ like them other motherfuckers
    I can make you rich (I can make you rich)
    I can make you this, baby, I can make you that
    I can take you there, but baby, you won’t make it back
    Growing sick of this and I don’t wanna make you sad
    Do I make you scared? Baby, won’t you take me back?
    [Refrain]
    Nothin’ like them other motherfuckers
    I can make you rich (I can make you rich)
    Nothin’ like them other motherfuckers
    I can make you rich
    [Chorus]
    Fuck my life, can’t save that, girl
    Don’t tell me you could save that shit
    All she want is payback for the way I always play that shit
    You ain’t gettin’ nothin’ that I’m sayin’
    Don’t tell me you is
    Nothin’ like them other motherfuckers
    I can make you rich (Make you rich)
    I can make you this, baby, I can make you that
    I can take you there, but baby, you won’t make it back
    Growing sick of this and I don’t wanna make you sad
    Do I make you scared? Baby, won’t you take me back?
    (Do I make you scared?)
    [Bridge]
    Down another lonely road, I go
    Just another lonely road to home
    I just wanna know, I just gotta know
    Do you wanna glo? Baby, we could glo
    [Chorus]
    Fuck my life, can’t save that, girl
    Don’t tell me you could save that shit
    All she want is payback for the way I always play that shit
    You ain’t gettin’ nothin’ that I’m sayin’
    Don’t tell me you is
    Nothin’ like them other motherfuckers
    I can make you rich (I can make you rich)
    I can make you this, baby, I can make you that
    I can take you there, but baby, you won’t make it back
    Growing sick of this and I don’t wanna make you sad
    Do I make you scared? Baby, won’t you take me back?
    [Outro]
    Do I make you scared? Baby, won’t you take me back?
    Nothin’ like them other mothafuckas’
    I can make you rich (I can make you rich)
    savethatshit LilPeep ComeOverWhenYoureSoberPt1

    Lil Peep - Save That Shit (Official Video)

    นอกจากการดูบทความนี้แล้ว คุณยังสามารถดูข้อมูลที่เป็นประโยชน์อื่นๆ อีกมากมายที่เราให้ไว้ที่นี่: ดูบทความเพิ่มเติมในหมวดหมู่LEARN TO MAKE A WEBSITE

    ขอบคุณที่รับชมกระทู้ครับ save หมาย ถึง

    Leave a Reply

    Your email address will not be published. Required fields are marked *