integration of appx applications with google earth © john selvage, selvage custom software appx...
TRANSCRIPT
APPX Conference - October 2011
Integration of APPX Applications with Google Earth ©
John Selvage,Selvage Custom Software
APPX Conference - October 2011
Integration of APPX Applications with Google Earth ©
• Introduction to Google Earth• Features• KML Primer• Acquisition of Earth Coordinates• Generation of KML by APPX Applications• Handoff of KML with File Association (.kml)
and LOAD_URL_ON_CLIENT• Applications
APPX Conference - October 2011
Introduction to Google Earth
• Google Product• 3D Extension of Google Maps• Unlike Google Maps, requires client-side
software other than a browser• Fully interactive• Complete data of Earth satellite imagery• Includes other “Layers”, including Borders,
Photos, 3D Buildings, Weather, and more
APPX Conference - October 2011
Google Earth Features
• Allows user to define:– Locations (Placemarks)– Lines (LineStrings)– Metadata, supported by standard HTML
<description><![CDATA[<B>123 Adams Street<BR>Orlando, FL 32812<BR><BR>Balance Due: $350,000.00]]></description>
– Standard Point-to-point representations are flat-earth, straight lines; I will demonstrate an enhancement that uses arches to better illustrate lines connecting points on Earth
APPX Conference - October 2011
KML Primer• XML derivative• Short for Keyhole Markup Language • Some basic elements include
– Placemarks (“pushpins”) <Placemark><description>… </Placemark></description>– Lines / Geometric Patterns <LineString><coordinates> -90.21, 38.59, .000000000000000 -90.07,
38.58, 36373.79 -89.92, 38.57, 72397.29 -89.78, 38.56, 107723.56 -89.63, 38.55, 142012.4 -89.48, 38.54, 174933.58 -89.34, 38.52, 206170.05 -89.19, 327277.71 -88.46, 38.45, 342848.27 -88.31, 38.44, 355117.01 -88.17, 38.43, 363965.78 -88.02, 38.42, 369309.36 -87.87, 107723.58 -85.82, 38.24, 72397.31 -85.68, 38.23, 36373.81 -85.53, 38.22, .01</coordinates></LineString>
– Attributes: color, width, time (!), icons, elevation, distance, camera angles, etc.• Excellent on-line reference material at
http://code.google.com/apis/kml/documentation/kmlreference.html and many other locations
• KML is not limited to Google Earth: can be used with Google Maps, and other tools• Demo of capabilities:
http://code.google.com/apis/kml/documentation/kmlfiles/balloonvisibility_tourexample.kml
http://appxge.selvage.com/travel.kml
APPX Conference - October 2011
Acquisition of Earth Coordinates
• Bundle address, city, state, ZIP, and country• Feed this address information to a website,
retrieve the corresponding latitude & longitude
• Data is stored with the CUSTOMER record (or whatever table you wish to associate it with)
• Coordinates can be updated whenever a change in any address component occurs
APPX Conference - October 2011
Acquisition of Earth CoordinatesBatch / Script
• @echo off• @curl -s maps.google.com/?q=%1 | tr "{" "\n"
| grep "^lat" | grep ",span" | cut -f 1,1 -d "}" | uniq | tr ":" "\n" | tr "," "\n" | grep -vE "lat|lng“
APPX Conference - October 2011
Generation of KML by APPX Applications
• Use the previously acquired Latitude & Longitude• Generate KML Header information• Put the Name, Address, Balance, and other
“Metadata” into the “Balloon” of a Placemark• Add additional features, such as color, lines
(linestrings), use of widths to encode data, etc.• Apply any camera viewing adjustments, as desired• Generate KML Trailer information
APPX Conference - October 2011
Handoff of KML with File Association (.kml) and LOAD_URL_ON_CLIENT
• One-time setup: associate .kml extension with the Google Earth program
• Execute build of text file <filename>.kml• Handoff from APPX to Google Earth with standard
PASS SGE KML FILENAME FIELD SHARE? NSUBR --- LOAD URL ON CLIENT DETACHED END? N FAIL 0
• File will immediately invoke, and be available in “Temporary Places”, where it can be moved to “My Places” for permanent storage
• Result of Mapping, with Arches• Result of KML with Time Stamps
APPX Conference - October 2011
Applications
• Management Reporting (dynamic generation of graphical output, nice complement to APPX Charts)
• Visual analysis of sales patterns• Visual analysis of shipping patterns• Concentration of Accounts Receivable by region• Air traffic patterns for maintenance• Facility / Branch / Franchise Management