SlideShare a Scribd company logo
1 of 48
Download to read offline
AJAX
       นาย ชัยภัทร เนื่องคํามา
  email : pk_a1977@hotmail.com
website: http://emap.wordpress.com

             ชัยภัทร เนื่องคํามา     1
Asynchronous JavaScript And XML
AJAX is an acronym for Asynchronous JavaScript And XML.
AJAX is not a new programming language, but simply a new technique for
creating better, faster, and more interactive web applications.
AJAX uses JavaScript to send and receive data between a web browser and
a web server.
The AJAX technique makes web pages more responsive by exchanging data
with the web server behind the scenes, instead of reloading an entire web
page each time a user makes a change.
                                ชัยภัทร เนื่องคํามา                   2
AJAX Is Based On Open Standards
AJAX is based on the following open standards:
•        JavaScript
•        XML
•        HTML
•        CSS
The open standards used in AJAX are well defined, and supported by all major
browsers. AJAX applications are browser and platform independent. (Cross-Platform,
Cross-Browser technology)
                                     ชัยภัทร เนื่องคํามา                        3
ชัยภัทร เนื่องคํามา   4
ชัยภัทร เนื่องคํามา   5
ชัยภัทร เนื่องคํามา   6
AJAX Is About Better Internet Applications
Web applications have many benefits over desktop applications:
•        they can reach a larger audience
•        they are easier to install and support
•        they are easier to develop
However, Internet applications are not always as quot;richquot; and user-friendly as traditional
desktop applications.
With AJAX, Internet applications can be made richer (smaller, faster, and easier to
use).                                   ชัยภัทร เนื่องคํามา                           7
AJAX Uses XML And HTTP Requests
A traditional web application will submit input (using an HTML form) to a web server.
After the web server has processed the data, it will return a completely new web page
to the user.
Because the server returns a new web page each time the user submits input, traditional
web applications often run slowly and tend to be less user friendly.




                                       ชัยภัทร เนื่องคํามา                          8
AJAX Uses XML And HTTP Requests
With AJAX, web applications can send and retrieve data without reloading the whole
web page. This is done by sending HTTP requests to the server (behind the scenes),
and by modifying only parts of the web page using JavaScript when the server returns
data.
XML is commonly used as the format for receiving server data, although any format,
including plain text, can be used.
You will learn more about how this is done in the next chapters of this tutorial.

                                        ชัยภัทร เนื่องคํามา                         9
PHP and AJAX
There is no such thing as an AJAX server.
AJAX is a technology that runs in your browser. It uses asynchronous data transfer
(HTTP requests) between the browser and the web server, allowing web pages to
request small bits of information from the server instead of whole pages.
AJAX is a web browser technology independent of web server software.
However, in this tutorial we will focus more on actual examples running on a PHP
server, and less on how AJAX works.

                                      ชัยภัทร เนื่องคํามา                            10
The XMLHttpRequest
The XMLHttpRequest object is the key to AJAX.
Creating An XMLHttpRequest Object
Different browsers use different methods to create an XMLHttpRequest object.
Internet Explorer uses an ActiveXObject.
Other browsers uses a built in JavaScript object called XMLHttpRequest



                                     ชัยภัทร เนื่องคํามา                       11
The XMLHttpRequest
var XMLHttp=null
if (window.XMLHttpRequest){
 XMLHttp=new XMLHttpRequest()
 }
else if (window.ActiveXObject){
 XMLHttp=new ActiveXObject(quot;Microsoft.XMLHTTPquot;)
 }                                ชัยภัทร เนื่องคํามา   12
function GetXmlHttpObject(){
var xmlHttp=null;
try{
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e){
 // Internet Explorer
 try{
  xmlHttp=new ActiveXObject(quot;Msxml2.XMLHTTPquot;);
  }
 catch (e){
  xmlHttp=new ActiveXObject(quot;Microsoft.XMLHTTPquot;);
  }
 }
return xmlHttp;                          ชัยภัทร เนื่องคํามา   13
}
AJAX&Web Mapping Application



            ชัยภัทร เนื่องคํามา   14
AJAX & Web Mapping Application
         AJAX ถูกนํามาใชในการพัฒนาการทํางานและการรับสงขอมูลในสวนของ
Web Mapping Application ซึ่งทํางานบนฝงลูกขาย โดย Web Mapping Application
แบบใหมจะเพิ่มความสามารถในการโตตอบกับผูใช และมีการรับสงขอมูลเชิงบรรยาย
และขอมูลเวกเตอรกราฟกในรูปแบบ XML base ดวย AJAX
        AJAX ถูกนําไปใชอยางแพรหลายมาก โดยเฉพาะ Mushup Application ไดแก
Google Map, Google Earth API, Yahoo Map API และอื่นๆ




                                  ชัยภัทร เนื่องคํามา                    15
Spatial Encoding
         AJAX สามารถทํางานรวมกับขอมูล XML ในการรับสงขอมูลระหวางแมขาย
และลูกขายไดเปนอยางดีดังนั้น จึงมีการพัฒนารูปแบบการเขารหัสขอมูลภูมสารสนเทศ
                                                                       ิ
และขอมูลเชิงพื้นที่ในลักษณะ XML Base มากมายเชน KML, GeoRSS, GML เปนตน




                                    ชัยภัทร เนื่องคํามา                     16
Spatial Encoding
         AJAX สามารถทํางานรวมกับขอมูล XML ในการรับสงขอมูลระหวางแมขาย
และลูกขายไดเปนอยางดีดังนั้น จึงมีการพัฒนารูปแบบการเขารหัสขอมูลภูมสารสนเทศ
                                                                       ิ
และขอมูลเชิงพื้นที่ในลักษณะ XML Base มากมายเชน KML, GeoRSS, GML เปนตน




                                    ชัยภัทร เนื่องคํามา                     17
KML
           KML เปนรูปแบบการจัดเก็บขอมูลเชิงพื้นที่ที่พัฒนามาจากระบบ
 บริการแผนที่ของ Google ปจจุบัน KML เปนมาตรฐานการแลกเปลี่ยนขอมูล
 หนึ่งของ OGC โดยมีรูปแบบการจัดเก็บขอมูลแบบ XML มีความยืดหยุน
 สามารถเชื่อมโยงกับระบบสารสนเทศตางๆไดมากมาย ใชระบบพิกัดภูมิศาสตร
 คือ EPSG 4326 World Geodetic Reference System KML มี MIMETYPE คือ
 application/vnd.google-earth.kml+xml นอกจากนี้ยังมีรูปแบบบีบอัดในลักษณะ
 ของไบนารีคือ KMZ อีกดวย




                                 ชัยภัทร เนื่องคํามา                       18
KML




      ชัยภัทร เนื่องคํามา   19
GeoJson
           GeoJson เปนรูปแบบการจัดเก็บขอมูลเชิงพื้นที่ที่กําลังพัฒนา โดยเนน
  ไปที่การรับสงขอมูลผานอินเตอรเน็ตโดยใชรูปแบบของ Json ซึ่งทําใหงายใน
  การเขารหัสและการแปล โดยนิยมนํามาใชทํางานรวมกับเทคนิค AJAX




                                     ชัยภัทร เนื่องคํามา                         20
GeoRSS
          GeoRSS เปนรูปแบบการจัดเก็บขอมูลเชิงพื้นที่ประเภทจุด ในรูปแบบ
ของคาพิกัดภูมิศาสตร X,Y โดยมีการสราง TAG พิเศษสําหรับการบรรยายและการ
เก็บคุณสมบัติเชิงพื้นที่เสริมตอมาจากมาตรฐานของ RSS 2.0 โดยมีการนําไปใชใน
ระบบ feeding ขาวสารหรือขอมูลที่มีการเปลี่ยนแปลง โดยขอดีคือใชงานกับ feed
reader ได ถาตองการแสดงผลในรูปแบบ mapping ก็สามารถใชงาน mushup อยาง
google map ได โดย API รองรับ Georss อยูแลว




                                    ชัยภัทร เนื่องคํามา                       21
Demo AJAX&Geoweb Application




            ชัยภัทร เนื่องคํามา   22
Business

           ชัยภัทร เนื่องคํามา   23
News / Event

               ชัยภัทร เนื่องคํามา   24
News / Event

               ชัยภัทร เนื่องคํามา   25
Real estate
ชัยภัทร เนื่องคํามา                 26
VDO Tracking
   ชัยภัทร เนื่องคํามา   27
whereyougonnabe




                  ชัยภัทร เนื่องคํามา   28
Barbond




          ชัยภัทร เนื่องคํามา   29
Spot Information
       ชัยภัทร เนื่องคํามา   30
Social Network
      ชัยภัทร เนื่องคํามา   31
Photo Sharing

       ชัยภัทร เนื่องคํามา   32
MapServer Application




                        ชัยภัทร เนื่องคํามา   33
Geoweb Development Framework



           ชัยภัทร เนื่องคํามา   34
GeoDjango

        Django is a high-level Python web framework that
encourages rapid development and clean, pragmatic design.
GeoDjango is an official branch of Django that intends to be a
world-class geographic web framework. GeoDjango is BSD-
licensed and cross-platform (Linux, Windows, Mac OS X, and
Solaris platforms) and supports the spatial capabilities of the
PostGIS, Oracle, and MySQL databases

                                 ชัยภัทร เนื่องคํามา              35
GeoDjango

       GeoDjango speaks the languages of the geographic web and
supports KML, GML, WKT, WKB, GeoRSS, and GeoJSON formats.
Web maps may be created using the APIs for Google Maps and
OpenLayers. Moreover, the built-in geographic admin supports the
manipulation and visualization of spatial data. Databrowse
dynamically creates a rich, browsable web site by introspecting your
models.
                    http://geodjango.org/docs/model-api.html
                                 ชัยภัทร เนื่องคํามา             36
ชัยภัทร เนื่องคํามา   37
Open Geo-Stack

       An open geo-stack offers a flexible and feature filled solution
for your web mapping needs. Store your data with PostGIS, set up
GeoServer to publish it, and develop an OpenLayers based client for
the browser. This tutorial will focus on these three core components of
an open source geo-stack and will also cover architectures that cross
the proprietary/open source divide.


                                 ชัยภัทร เนื่องคํามา                38
MapStrack

           Mapstraction floats on top of niine APIs: Microsoft VE,
 Google, Yahoo!, MultiMap, Poly9 FreeEarth, Map24, MapQuest, and
 OpenStreetMap. Each one has different features and qualities of aerial
 and mapping data, and your use may depend on area of interest (who
 has the best aerial imagery in Bangalore?) or features (can I plot
 GeoRSS?). With Mapstraction you can make these decisions on the fly
 and not get locked into one specific API. We’ll tour adding simple
 maps, pins, and geocoding. Plotting GeoRSS and switching APIs on
 the fly. Some JavaScript knowledge is preferable but not an absolute
 necessity.                      ชัยภัทร เนื่องคํามา                      39
ชัยภัทร เนื่องคํามา   40
OpenGWT

        Google Web Toolkit (GWT) is an open source Java software
development framework that allows web developers to create Ajax
applications in Java. It is licensed under the Apache License version
2.0.[1]
       GWT emphasizes reusable, efficient solutions to recurring
Ajax challenges, namely asynchronous remote procedure calls, history
management, bookmarking, and cross-browser portability.
                                 ชัยภัทร เนื่องคํามา                41
OpenGWT

          GWT - OpenLayers plugin is an open source project implemented by Erdem
Gunay. Although it does not support all the OpenLayers classes yet, it is in a good shape
to use main features including
- Map, Marker, Icon, LonLat, Size, Pixel, Bounds etc.
- Layers (WMS, Google, Vector, Markers)
- Controls (DrawFeature, LayerSwitcher, MousePosition, MouseToolbar, PanZoomBar,
Scale)
- Handlers (Point, Path, Polygon)
- Popups (Popup, Anchored, AnchoredBubble) Events

                                          ชัยภัทร เนื่องคํามา                          42
OpenGWT




          http://sourceforge.net/projects/gwt-openlayers

                           ชัยภัทร เนื่องคํามา             43
Ruby (Cartographer Plugin)
          Allows you to plop Google Maps down into your Rails app without knowing a
lick of ECMAScript Javascript.

      http://wiki.rubyonrails.org/rails/pages/Cartographer+Plugin
Get a Google Maps API key and tell it to Cartographer
add <%= gmaps_header %> to your layout
In controller, such as:
@map = Map.new(:name => ‘mymap’, :width => 300, :center => Point.new(-110, 33))
In view, such as: <%= @map.to_html %>
                                        ชัยภัทร เนื่องคํามา                      44
Ruby (Geokit)
           Geokit is a Rails plugin for building location-based apps. It provides geocoding,
location finders, and distance calculation in one cohesive package. If you have any tables
with latitude/longitude columns in your database, or if you every wanted to easily query
for quot;all the stores within a 50 mile radius,quot; then GeoKit is for you.



              http://geokit.rubyforge.org/


                                           ชัยภัทร เนื่องคํามา                           45
Ruby




       ชัยภัทร เนื่องคํามา   46
Geoweb Resource
    - Slash GEO
    - GIS Development
    - Emap




                        ชัยภัทร เนื่องคํามา   47
ขอบคุณครับ




   ชัยภัทร เนื่องคํามา   48

More Related Content

What's hot

Lap Trinh Web Dong Voi Php & My Sql
Lap Trinh Web Dong Voi Php & My SqlLap Trinh Web Dong Voi Php & My Sql
Lap Trinh Web Dong Voi Php & My SqlSamQuiDaiBo
 
How I learned to stop worrying and love the .htaccess file
How I learned to stop worrying and love the .htaccess fileHow I learned to stop worrying and love the .htaccess file
How I learned to stop worrying and love the .htaccess fileRoxana Stingu
 
BNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demoBNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demoBookNet Canada
 
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesJazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesSimon Willison
 
BD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginningBD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginningPeter McLachlan
 
Mobile Web Performance - Getting and Staying Fast
Mobile Web Performance -  Getting and Staying FastMobile Web Performance -  Getting and Staying Fast
Mobile Web Performance - Getting and Staying FastAndy Davies
 

What's hot (7)

Lap Trinh Web Dong Voi Php & My Sql
Lap Trinh Web Dong Voi Php & My SqlLap Trinh Web Dong Voi Php & My Sql
Lap Trinh Web Dong Voi Php & My Sql
 
How I learned to stop worrying and love the .htaccess file
How I learned to stop worrying and love the .htaccess fileHow I learned to stop worrying and love the .htaccess file
How I learned to stop worrying and love the .htaccess file
 
BNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demoBNC Tech Forum 09: Lexcycle Stanza demo
BNC Tech Forum 09: Lexcycle Stanza demo
 
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesJazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
 
BD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginningBD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginning
 
Modelling Web Performance Optimization - FFSUx
Modelling  Web Performance Optimization - FFSUxModelling  Web Performance Optimization - FFSUx
Modelling Web Performance Optimization - FFSUx
 
Mobile Web Performance - Getting and Staying Fast
Mobile Web Performance -  Getting and Staying FastMobile Web Performance -  Getting and Staying Fast
Mobile Web Performance - Getting and Staying Fast
 

Viewers also liked

Viewers also liked (7)

Foss4g thai
Foss4g thaiFoss4g thai
Foss4g thai
 
Global Studies Unit #4 Europe And Russia
Global Studies Unit #4    Europe And RussiaGlobal Studies Unit #4    Europe And Russia
Global Studies Unit #4 Europe And Russia
 
Android report
Android reportAndroid report
Android report
 
Wps
WpsWps
Wps
 
30879960 geospatial-system-on-cloud-computing
30879960 geospatial-system-on-cloud-computing30879960 geospatial-system-on-cloud-computing
30879960 geospatial-system-on-cloud-computing
 
Concect postgis
Concect postgisConcect postgis
Concect postgis
 
WebGIS
WebGISWebGIS
WebGIS
 

Similar to Ajax&Geoweb C

Swap Skills I Phone
Swap Skills I PhoneSwap Skills I Phone
Swap Skills I PhoneSwapSkills
 
20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編mochiko AsTech
 
yusukebe in Yokohama.pm 090909
yusukebe in Yokohama.pm 090909yusukebe in Yokohama.pm 090909
yusukebe in Yokohama.pm 090909Yusuke Wada
 
Web技術勉強会 第19回
Web技術勉強会 第19回Web技術勉強会 第19回
Web技術勉強会 第19回龍一 田中
 
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)taiwanweb20
 
톰캣 #05-배치
톰캣 #05-배치톰캣 #05-배치
톰캣 #05-배치GyuSeok Lee
 
Rails Deployment with NginX
Rails Deployment with NginXRails Deployment with NginX
Rails Deployment with NginXStoyan Zhekov
 
Working With Rails
Working With RailsWorking With Rails
Working With RailsDali Wang
 
Ruby on Rails Tutorial Part I
Ruby on Rails Tutorial Part IRuby on Rails Tutorial Part I
Ruby on Rails Tutorial Part IWei Jen Lu
 
распознавание для Web
распознавание для Webраспознавание для Web
распознавание для Websef2009
 
Understanding Web Services
Understanding Web ServicesUnderstanding Web Services
Understanding Web Servicesaru85
 
High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)Stoyan Stefanov
 
20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編mochiko AsTech
 
Understanding Web Services
Understanding Web ServicesUnderstanding Web Services
Understanding Web Servicesaru85
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up360|Conferences
 
E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance MonitoringPerconaPerformance
 

Similar to Ajax&Geoweb C (20)

Swap Skills I Phone
Swap Skills I PhoneSwap Skills I Phone
Swap Skills I Phone
 
20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編20090418 イケテルRails勉強会 第2部Air編
20090418 イケテルRails勉強会 第2部Air編
 
yusukebe in Yokohama.pm 090909
yusukebe in Yokohama.pm 090909yusukebe in Yokohama.pm 090909
yusukebe in Yokohama.pm 090909
 
Web技術勉強会 第19回
Web技術勉強会 第19回Web技術勉強会 第19回
Web技術勉強会 第19回
 
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
Web 2.0 架站工具—AJAX By Examples-馮彥文(Tempo)
 
Revisited
RevisitedRevisited
Revisited
 
톰캣 #05-배치
톰캣 #05-배치톰캣 #05-배치
톰캣 #05-배치
 
Rails Deployment with NginX
Rails Deployment with NginXRails Deployment with NginX
Rails Deployment with NginX
 
Working With Rails
Working With RailsWorking With Rails
Working With Rails
 
Ruby on Rails Tutorial Part I
Ruby on Rails Tutorial Part IRuby on Rails Tutorial Part I
Ruby on Rails Tutorial Part I
 
распознавание для Web
распознавание для Webраспознавание для Web
распознавание для Web
 
Understanding Web Services
Understanding Web ServicesUnderstanding Web Services
Understanding Web Services
 
High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)
 
20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編20090418 イケテルRails勉強会 第1部Rails編
20090418 イケテルRails勉強会 第1部Rails編
 
Understanding Web Services
Understanding Web ServicesUnderstanding Web Services
Understanding Web Services
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up
 
Ajax
AjaxAjax
Ajax
 
Reification
ReificationReification
Reification
 
Seize The Cloud
Seize The CloudSeize The Cloud
Seize The Cloud
 
E M T Better Performance Monitoring
E M T  Better  Performance  MonitoringE M T  Better  Performance  Monitoring
E M T Better Performance Monitoring
 

More from Ayutthaya GIS

More from Ayutthaya GIS (7)

Python for GIS
Python for  GISPython for  GIS
Python for GIS
 
Ogctaxmap
OgctaxmapOgctaxmap
Ogctaxmap
 
GeoSMSSensor
GeoSMSSensorGeoSMSSensor
GeoSMSSensor
 
Geoserver 85
Geoserver 85Geoserver 85
Geoserver 85
 
Map
MapMap
Map
 
Chula Geoportal Emap
Chula Geoportal EmapChula Geoportal Emap
Chula Geoportal Emap
 
geoweb2.0
geoweb2.0geoweb2.0
geoweb2.0
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Ajax&Geoweb C

  • 1. AJAX นาย ชัยภัทร เนื่องคํามา email : pk_a1977@hotmail.com website: http://emap.wordpress.com ชัยภัทร เนื่องคํามา 1
  • 2. Asynchronous JavaScript And XML AJAX is an acronym for Asynchronous JavaScript And XML. AJAX is not a new programming language, but simply a new technique for creating better, faster, and more interactive web applications. AJAX uses JavaScript to send and receive data between a web browser and a web server. The AJAX technique makes web pages more responsive by exchanging data with the web server behind the scenes, instead of reloading an entire web page each time a user makes a change. ชัยภัทร เนื่องคํามา 2
  • 3. AJAX Is Based On Open Standards AJAX is based on the following open standards: • JavaScript • XML • HTML • CSS The open standards used in AJAX are well defined, and supported by all major browsers. AJAX applications are browser and platform independent. (Cross-Platform, Cross-Browser technology) ชัยภัทร เนื่องคํามา 3
  • 7. AJAX Is About Better Internet Applications Web applications have many benefits over desktop applications: • they can reach a larger audience • they are easier to install and support • they are easier to develop However, Internet applications are not always as quot;richquot; and user-friendly as traditional desktop applications. With AJAX, Internet applications can be made richer (smaller, faster, and easier to use). ชัยภัทร เนื่องคํามา 7
  • 8. AJAX Uses XML And HTTP Requests A traditional web application will submit input (using an HTML form) to a web server. After the web server has processed the data, it will return a completely new web page to the user. Because the server returns a new web page each time the user submits input, traditional web applications often run slowly and tend to be less user friendly. ชัยภัทร เนื่องคํามา 8
  • 9. AJAX Uses XML And HTTP Requests With AJAX, web applications can send and retrieve data without reloading the whole web page. This is done by sending HTTP requests to the server (behind the scenes), and by modifying only parts of the web page using JavaScript when the server returns data. XML is commonly used as the format for receiving server data, although any format, including plain text, can be used. You will learn more about how this is done in the next chapters of this tutorial. ชัยภัทร เนื่องคํามา 9
  • 10. PHP and AJAX There is no such thing as an AJAX server. AJAX is a technology that runs in your browser. It uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages. AJAX is a web browser technology independent of web server software. However, in this tutorial we will focus more on actual examples running on a PHP server, and less on how AJAX works. ชัยภัทร เนื่องคํามา 10
  • 11. The XMLHttpRequest The XMLHttpRequest object is the key to AJAX. Creating An XMLHttpRequest Object Different browsers use different methods to create an XMLHttpRequest object. Internet Explorer uses an ActiveXObject. Other browsers uses a built in JavaScript object called XMLHttpRequest ชัยภัทร เนื่องคํามา 11
  • 12. The XMLHttpRequest var XMLHttp=null if (window.XMLHttpRequest){ XMLHttp=new XMLHttpRequest() } else if (window.ActiveXObject){ XMLHttp=new ActiveXObject(quot;Microsoft.XMLHTTPquot;) } ชัยภัทร เนื่องคํามา 12
  • 13. function GetXmlHttpObject(){ var xmlHttp=null; try{ // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e){ // Internet Explorer try{ xmlHttp=new ActiveXObject(quot;Msxml2.XMLHTTPquot;); } catch (e){ xmlHttp=new ActiveXObject(quot;Microsoft.XMLHTTPquot;); } } return xmlHttp; ชัยภัทร เนื่องคํามา 13 }
  • 14. AJAX&Web Mapping Application ชัยภัทร เนื่องคํามา 14
  • 15. AJAX & Web Mapping Application AJAX ถูกนํามาใชในการพัฒนาการทํางานและการรับสงขอมูลในสวนของ Web Mapping Application ซึ่งทํางานบนฝงลูกขาย โดย Web Mapping Application แบบใหมจะเพิ่มความสามารถในการโตตอบกับผูใช และมีการรับสงขอมูลเชิงบรรยาย และขอมูลเวกเตอรกราฟกในรูปแบบ XML base ดวย AJAX AJAX ถูกนําไปใชอยางแพรหลายมาก โดยเฉพาะ Mushup Application ไดแก Google Map, Google Earth API, Yahoo Map API และอื่นๆ ชัยภัทร เนื่องคํามา 15
  • 16. Spatial Encoding AJAX สามารถทํางานรวมกับขอมูล XML ในการรับสงขอมูลระหวางแมขาย และลูกขายไดเปนอยางดีดังนั้น จึงมีการพัฒนารูปแบบการเขารหัสขอมูลภูมสารสนเทศ ิ และขอมูลเชิงพื้นที่ในลักษณะ XML Base มากมายเชน KML, GeoRSS, GML เปนตน ชัยภัทร เนื่องคํามา 16
  • 17. Spatial Encoding AJAX สามารถทํางานรวมกับขอมูล XML ในการรับสงขอมูลระหวางแมขาย และลูกขายไดเปนอยางดีดังนั้น จึงมีการพัฒนารูปแบบการเขารหัสขอมูลภูมสารสนเทศ ิ และขอมูลเชิงพื้นที่ในลักษณะ XML Base มากมายเชน KML, GeoRSS, GML เปนตน ชัยภัทร เนื่องคํามา 17
  • 18. KML KML เปนรูปแบบการจัดเก็บขอมูลเชิงพื้นที่ที่พัฒนามาจากระบบ บริการแผนที่ของ Google ปจจุบัน KML เปนมาตรฐานการแลกเปลี่ยนขอมูล หนึ่งของ OGC โดยมีรูปแบบการจัดเก็บขอมูลแบบ XML มีความยืดหยุน สามารถเชื่อมโยงกับระบบสารสนเทศตางๆไดมากมาย ใชระบบพิกัดภูมิศาสตร คือ EPSG 4326 World Geodetic Reference System KML มี MIMETYPE คือ application/vnd.google-earth.kml+xml นอกจากนี้ยังมีรูปแบบบีบอัดในลักษณะ ของไบนารีคือ KMZ อีกดวย ชัยภัทร เนื่องคํามา 18
  • 19. KML ชัยภัทร เนื่องคํามา 19
  • 20. GeoJson GeoJson เปนรูปแบบการจัดเก็บขอมูลเชิงพื้นที่ที่กําลังพัฒนา โดยเนน ไปที่การรับสงขอมูลผานอินเตอรเน็ตโดยใชรูปแบบของ Json ซึ่งทําใหงายใน การเขารหัสและการแปล โดยนิยมนํามาใชทํางานรวมกับเทคนิค AJAX ชัยภัทร เนื่องคํามา 20
  • 21. GeoRSS GeoRSS เปนรูปแบบการจัดเก็บขอมูลเชิงพื้นที่ประเภทจุด ในรูปแบบ ของคาพิกัดภูมิศาสตร X,Y โดยมีการสราง TAG พิเศษสําหรับการบรรยายและการ เก็บคุณสมบัติเชิงพื้นที่เสริมตอมาจากมาตรฐานของ RSS 2.0 โดยมีการนําไปใชใน ระบบ feeding ขาวสารหรือขอมูลที่มีการเปลี่ยนแปลง โดยขอดีคือใชงานกับ feed reader ได ถาตองการแสดงผลในรูปแบบ mapping ก็สามารถใชงาน mushup อยาง google map ได โดย API รองรับ Georss อยูแลว ชัยภัทร เนื่องคํามา 21
  • 22. Demo AJAX&Geoweb Application ชัยภัทร เนื่องคํามา 22
  • 23. Business ชัยภัทร เนื่องคํามา 23
  • 24. News / Event ชัยภัทร เนื่องคํามา 24
  • 25. News / Event ชัยภัทร เนื่องคํามา 25
  • 27. VDO Tracking ชัยภัทร เนื่องคํามา 27
  • 28. whereyougonnabe ชัยภัทร เนื่องคํามา 28
  • 29. Barbond ชัยภัทร เนื่องคํามา 29
  • 30. Spot Information ชัยภัทร เนื่องคํามา 30
  • 31. Social Network ชัยภัทร เนื่องคํามา 31
  • 32. Photo Sharing ชัยภัทร เนื่องคํามา 32
  • 33. MapServer Application ชัยภัทร เนื่องคํามา 33
  • 34. Geoweb Development Framework ชัยภัทร เนื่องคํามา 34
  • 35. GeoDjango Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. GeoDjango is an official branch of Django that intends to be a world-class geographic web framework. GeoDjango is BSD- licensed and cross-platform (Linux, Windows, Mac OS X, and Solaris platforms) and supports the spatial capabilities of the PostGIS, Oracle, and MySQL databases ชัยภัทร เนื่องคํามา 35
  • 36. GeoDjango GeoDjango speaks the languages of the geographic web and supports KML, GML, WKT, WKB, GeoRSS, and GeoJSON formats. Web maps may be created using the APIs for Google Maps and OpenLayers. Moreover, the built-in geographic admin supports the manipulation and visualization of spatial data. Databrowse dynamically creates a rich, browsable web site by introspecting your models. http://geodjango.org/docs/model-api.html ชัยภัทร เนื่องคํามา 36
  • 38. Open Geo-Stack An open geo-stack offers a flexible and feature filled solution for your web mapping needs. Store your data with PostGIS, set up GeoServer to publish it, and develop an OpenLayers based client for the browser. This tutorial will focus on these three core components of an open source geo-stack and will also cover architectures that cross the proprietary/open source divide. ชัยภัทร เนื่องคํามา 38
  • 39. MapStrack Mapstraction floats on top of niine APIs: Microsoft VE, Google, Yahoo!, MultiMap, Poly9 FreeEarth, Map24, MapQuest, and OpenStreetMap. Each one has different features and qualities of aerial and mapping data, and your use may depend on area of interest (who has the best aerial imagery in Bangalore?) or features (can I plot GeoRSS?). With Mapstraction you can make these decisions on the fly and not get locked into one specific API. We’ll tour adding simple maps, pins, and geocoding. Plotting GeoRSS and switching APIs on the fly. Some JavaScript knowledge is preferable but not an absolute necessity. ชัยภัทร เนื่องคํามา 39
  • 41. OpenGWT Google Web Toolkit (GWT) is an open source Java software development framework that allows web developers to create Ajax applications in Java. It is licensed under the Apache License version 2.0.[1] GWT emphasizes reusable, efficient solutions to recurring Ajax challenges, namely asynchronous remote procedure calls, history management, bookmarking, and cross-browser portability. ชัยภัทร เนื่องคํามา 41
  • 42. OpenGWT GWT - OpenLayers plugin is an open source project implemented by Erdem Gunay. Although it does not support all the OpenLayers classes yet, it is in a good shape to use main features including - Map, Marker, Icon, LonLat, Size, Pixel, Bounds etc. - Layers (WMS, Google, Vector, Markers) - Controls (DrawFeature, LayerSwitcher, MousePosition, MouseToolbar, PanZoomBar, Scale) - Handlers (Point, Path, Polygon) - Popups (Popup, Anchored, AnchoredBubble) Events ชัยภัทร เนื่องคํามา 42
  • 43. OpenGWT http://sourceforge.net/projects/gwt-openlayers ชัยภัทร เนื่องคํามา 43
  • 44. Ruby (Cartographer Plugin) Allows you to plop Google Maps down into your Rails app without knowing a lick of ECMAScript Javascript. http://wiki.rubyonrails.org/rails/pages/Cartographer+Plugin Get a Google Maps API key and tell it to Cartographer add <%= gmaps_header %> to your layout In controller, such as: @map = Map.new(:name => ‘mymap’, :width => 300, :center => Point.new(-110, 33)) In view, such as: <%= @map.to_html %> ชัยภัทร เนื่องคํามา 44
  • 45. Ruby (Geokit) Geokit is a Rails plugin for building location-based apps. It provides geocoding, location finders, and distance calculation in one cohesive package. If you have any tables with latitude/longitude columns in your database, or if you every wanted to easily query for quot;all the stores within a 50 mile radius,quot; then GeoKit is for you. http://geokit.rubyforge.org/ ชัยภัทร เนื่องคํามา 45
  • 46. Ruby ชัยภัทร เนื่องคํามา 46
  • 47. Geoweb Resource - Slash GEO - GIS Development - Emap ชัยภัทร เนื่องคํามา 47
  • 48. ขอบคุณครับ ชัยภัทร เนื่องคํามา 48