SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
Geo Maps For papaya CMS




05.06.09         Geo Maps - Martin Kelm   1
Agenda

      1. Google & Yahoo Maps

      2. More Interfaces

      3. Geo Maps

      4. Geo Maps Modules

      5. Sources And Links


05.06.09              Geo Maps - Martin Kelm   2
1. Google & Yahoo Maps




05.06.09         Geo Maps - Martin Kelm   3
1.1. Google Maps

           8th february, 2005
              Default view

              April 2005
             Satellite view

            22th july, 2005
             Hybrid view

           2nd january, 2006
             Route maps


05.06.09                      Geo Maps - Martin Kelm   4
1.1.1. Google Maps Overview




05.06.09           Geo Maps - Martin Kelm   5
1.1.2. More Google Maps Types



           Satellit e        Hybrid                 Physical




            Mars        Mars (Elevation)         Mars (Infrared)




            Moon        Mond (Elevation)         Stars / Sky



05.06.09                Geo Maps - Martin Kelm                     6
1.1.3. Google Maps API

                                               Free service with key
           June 2005:                             Javascript / XML
            Version 1                            Own data / points
                                          without advertisements (so far)*


                                                  New features a.o.
       3rd april, 2006:                            Faster download
          Version 2                               Own map overlays
                                                 Memory optimization



       11th june, 2006:                         Parser for addresses
          Geocoder                           and coordinates calculation



                          * Alternative: Google Maps API Premier (controllable advertisments)

05.06.09                      Geo Maps - Martin Kelm                                            7
1.1.4. Google Geocoder

                                         HTTP / JavaScript
   Address input                             request
                                                             Address output
              Single string                                     Address splitted in components
       No formatting specifications                             eXtensible Address Language
         Supports abbreviations                                    Supports 200+ countries




              Client-side cache
           less Geocoder-requests
              More performance

                                                             Simple Geocoder

                                                                         Coordinates
   Up to 50.000 Requests per API key / day                          (Latitude / Longitude)

                                                             JavaScript request: GclientGeocoder()
05.06.09                               Geo Maps - Martin Kelm                                        8
1.2. Yahoo Maps




           Free service with application ID
           since 03.11.2005 (Beta release)

05.06.09        Geo Maps - Martin Kelm        9
1.2.1. Yahoo Maps API


First version in summer 2005
        (released with
      Google Maps API)

              for USA only
           (at the beginning)

            with Geocoder

             Flash / Ajax




05.06.09                        Geo Maps - Martin Kelm   10
2. More Interfaces




                                       Open Layers




05.06.09      Geo Maps - Martin Kelm                 11
2.1. Google Earth


             Virtual 3D globe

           Different map layers

       Interchange format KML




                           Basic version for free

            Windows, Mac OS X, Linux, SymbianOS, iPhone OS

05.06.09                        Geo Maps - Martin Kelm       12
2.2. Open Layers


                       Open Layers

            Open Geospatial Consortium (2008)

           Open map layers (standardized formats)

                       Closed formats
                 (Microsoft, Google, Yahoo)


05.06.09                Geo Maps - Martin Kelm      13
2.2.1. Open Layers Example 1




                  Draw functions

05.06.09           Geo Maps - Martin Kelm   14
2.2.2. Open Layers Example 2




                GeoRSS with Flickr images
           var newl = new OpenLayers.Layer.GeoRSS('georss.xml');
           map.addLayer(newl);

05.06.09                   Geo Maps - Martin Kelm                  15
2.2.2.1. GeoRSS Example




           GeoRSS according to W3C standard

05.06.09              Geo Maps - Martin Kelm   16
2.2.3. Open Street Map

                      Collection of free usable geo data
                     Wiki-like database with edit functions
                     Creative Commons Share-Alike 2.0




05.06.09        Geo Maps - Martin Kelm                        17
3. Geo Maps



              papaya CMS (RC1 and nightly)

               Developement since mai 2007

           Google Maps / Yahoo Maps integration

              Markers and keys management



05.06.09               Geo Maps - Martin Kelm     18
3.1. API Functions In Geo Maps

   - (De-)Activate / configure map controls

   - Set map type / size and zoom level

   - Arange / center map

   - Descriptions by using mouse-events

   - Lines (Polyline)

   - Static maps

   - Get map coordinates by click                   OnClick-Event / Description


05.06.09                   Geo Maps - Martin Kelm                            19
3.1.1. More Examples




 Get map coordinates to set them into a
 input field.                                   Set polygon lines




05.06.09                          Geo Maps - Martin Kelm            20
4. Geo Maps Modules




           Geo Maps modules overview in the papaya CMS backend




05.06.09                    Geo Maps - Martin Kelm               21
4.1. Administration




                  Markers management




           Keys / application IDs management

05.06.09             Geo Maps - Martin Kelm    22
4.1.1. Manage Markers




05.06.09        Geo Maps - Martin Kelm   23
4.1.2. Manage Keys / Application IDs




           Manage Google API keys and / or Yahoo application IDs




05.06.09                       Geo Maps - Martin Kelm              24
4.2. Map Boxes


              Google Maps Box                              Yahoo Maps Box

                                  Configuration




Get data from                      Output class                  Link-URLs and
configuration (setter)                                           XML-output (getter)



                                    Base class




  05.06.09                        Geo Maps - Martin Kelm                               25
4.2.1. - Configure Map Boxes




            Settings / options for map presentation




05.06.09              Geo Maps - Martin Kelm          26
4.2.2. - Configure Map Boxes




              Markers data / markers settings




05.06.09             Geo Maps - Martin Kelm     27
4.2.3. - Configure Map Boxes




              More configuration possibilities




05.06.09             Geo Maps - Martin Kelm      28
4.2.4. Dynamic And Static Map


                                   Static map request ->

                               URL
                               maps.google.com/staticmap

                               Paramter
                               - center = LAT,LNG
                               - zoom = 15
                               - size = 212x212
                               - maptype = roadmap
                               - markers = LAT,LNG,red
                               - key = API-KEY




Dynamic with control element                               Static map image

05.06.09                         Geo Maps - Martin Kelm                       29
4.2.4.1. Dynamic Map Request (1)

           Load API Java Script with API-key

        1. Check browser compatibility:
    GBrowserIsCompatible() -> TRUE / FALSE


                                                2. Get div-element from document:
                                        var mapElement = document.getElementById(quot;mapquot;);


3. Get map object with map size setting:
var googleMap = new Gmap2(
  mapElement, {'size' : new GSize(width, height)}
);


                                                    4. Set a valid map type:
                                           googleMaps.setMapType(mapTypeConstant);


05.06.09                             Geo Maps - Martin Kelm                          30
4.2.4.1. Dynamic Map Request (2)

           5. Add a control element:
googleMap.addControl(new GLargeMapControl());


                                               6. Get a point coordinate object:
                                                  var point = new GLatLng(
                                          parseFloat(latitude), parseFloat(longitude));



7. Center map:
googleMaps.setCenter(point);


                                                   8. Set markers:
                                           var marker = new GMarker(point);
                                    (more parameters for own icon images available)
                                           googleMaps.addOverlay(marker);

05.06.09                        Geo Maps - Martin Kelm                                    31
4.3. - Connector


           Base class        Connector class        Class of external module




                             Methods:

                Folders list as combo selection box

                           Add marker

                          Delete marker

05.06.09                   Geo Maps - Martin Kelm                          32
4.3.1. - Connector Example
      Map- and special box

                                                                            Geo Maps output class

                                                                     M1

                                                                              Geo Maps base class



                                                                     M2


       Click-Event function (overloaded)
   function coorModeAction(x, y) {
     if (lastMarker != null) googleMaps.removeOverlay(lastMarker);
     lastMarker = setMarker(new GLatLng(y, x));
                                                                            Geo Maps connector
     locationInput.value = y+','+x;
   }



05.06.09                                           Geo Maps - Martin Kelm                           33
4.4. Geo Maps Database Tables




05.06.09            Geo Maps - Martin Kelm   34
4.4.1. Markers Data Output


              KML

           Description
            in HTML

    XMLHttpRequest

            Styles for
           Google Earth


05.06.09                   Geo Maps - Martin Kelm   35
4.4.1.1. Export Markers Data




Export function in
backend

Download by using
a KML output mode
(markers data page)

KML contains styles
to get a marker icon




05.06.09                     Geo Maps - Martin Kelm   36
4.5. MySQL Spatial Extensions


                         Functions:
             Creation, storage and analysis of
                geographic characteristics


             Since MySQL 4.1 (for MyISAM)

                    Since 5.0.16 for
           InnoDB, NDB, BDB and ARCHIVE too

05.06.09            Geo Maps - Martin Kelm       37
4.5.1. SE Class Hierarchy



                              Point: 0-dimensional
                              Curve: 1-dimensional
                             Surface: 2-dimensional

                                GeometryCollection:
                                    Collection of
                                different geometries




05.06.09          Geo Maps - Martin Kelm               38
4.5.2. Geo Maps Functions For SE

           Base class for Spatial Extensions



                - Create database table                      Column type: polygon
               (for points and polygons)                     Index: SPATIAL KEY

                - Add / remove points

               - Add / remove polygons

                  - Get nearest point                        Column type: point
                                                             Index: SPATIAL KEY
             - Is point a within polygon x?




05.06.09                            Geo Maps - Martin Kelm                          39
4.5.3. SE Database Tables




   Extension tables for MySQL Spatial Extensions or rather polygon- and point-data.



05.06.09                          Geo Maps - Martin Kelm                              40
5. Sources And Further Links

martinkelm.de
en.wikipedia.org/wiki/Google_Maps
en.wikipedia.org/wiki/Google_Earth
en.wikipedia.org/wiki/Yahoo_Maps
en.wikipedia.org/wiki/Open_Layers
openlayers.org/dev/examples
www.georss.org/Main_Page
dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html
code.google.com/apis/maps/documentation/reference.html
developer.yahoo.com/maps/ajax/V2/reference.html
shrt.ws / weisse-liste.de
                                                 ENDE
05.06.09              Geo Maps - Martin Kelm              41

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (6)

Papaya Winning Business Models
Papaya Winning Business ModelsPapaya Winning Business Models
Papaya Winning Business Models
 
Parent infopkt10
Parent infopkt10Parent infopkt10
Parent infopkt10
 
Montessori101
Montessori101Montessori101
Montessori101
 
Parent Info 2009
Parent Info 2009Parent Info 2009
Parent Info 2009
 
Parent Info Nite 082212
Parent Info Nite 082212Parent Info Nite 082212
Parent Info Nite 082212
 
Demystifying montessori
Demystifying montessoriDemystifying montessori
Demystifying montessori
 

Kürzlich hochgeladen

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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 Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
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
 
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
 
🐬 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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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 Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.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
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

PHPUG - Geo Maps for papaya CMS

  • 1. Geo Maps For papaya CMS 05.06.09 Geo Maps - Martin Kelm 1
  • 2. Agenda 1. Google & Yahoo Maps 2. More Interfaces 3. Geo Maps 4. Geo Maps Modules 5. Sources And Links 05.06.09 Geo Maps - Martin Kelm 2
  • 3. 1. Google & Yahoo Maps 05.06.09 Geo Maps - Martin Kelm 3
  • 4. 1.1. Google Maps 8th february, 2005 Default view April 2005 Satellite view 22th july, 2005 Hybrid view 2nd january, 2006 Route maps 05.06.09 Geo Maps - Martin Kelm 4
  • 5. 1.1.1. Google Maps Overview 05.06.09 Geo Maps - Martin Kelm 5
  • 6. 1.1.2. More Google Maps Types Satellit e Hybrid Physical Mars Mars (Elevation) Mars (Infrared) Moon Mond (Elevation) Stars / Sky 05.06.09 Geo Maps - Martin Kelm 6
  • 7. 1.1.3. Google Maps API Free service with key June 2005: Javascript / XML Version 1 Own data / points without advertisements (so far)* New features a.o. 3rd april, 2006: Faster download Version 2 Own map overlays Memory optimization 11th june, 2006: Parser for addresses Geocoder and coordinates calculation * Alternative: Google Maps API Premier (controllable advertisments) 05.06.09 Geo Maps - Martin Kelm 7
  • 8. 1.1.4. Google Geocoder HTTP / JavaScript Address input request Address output Single string Address splitted in components No formatting specifications eXtensible Address Language Supports abbreviations Supports 200+ countries Client-side cache less Geocoder-requests More performance Simple Geocoder Coordinates Up to 50.000 Requests per API key / day (Latitude / Longitude) JavaScript request: GclientGeocoder() 05.06.09 Geo Maps - Martin Kelm 8
  • 9. 1.2. Yahoo Maps Free service with application ID since 03.11.2005 (Beta release) 05.06.09 Geo Maps - Martin Kelm 9
  • 10. 1.2.1. Yahoo Maps API First version in summer 2005 (released with Google Maps API) for USA only (at the beginning) with Geocoder Flash / Ajax 05.06.09 Geo Maps - Martin Kelm 10
  • 11. 2. More Interfaces Open Layers 05.06.09 Geo Maps - Martin Kelm 11
  • 12. 2.1. Google Earth Virtual 3D globe Different map layers Interchange format KML Basic version for free Windows, Mac OS X, Linux, SymbianOS, iPhone OS 05.06.09 Geo Maps - Martin Kelm 12
  • 13. 2.2. Open Layers Open Layers Open Geospatial Consortium (2008) Open map layers (standardized formats) Closed formats (Microsoft, Google, Yahoo) 05.06.09 Geo Maps - Martin Kelm 13
  • 14. 2.2.1. Open Layers Example 1 Draw functions 05.06.09 Geo Maps - Martin Kelm 14
  • 15. 2.2.2. Open Layers Example 2 GeoRSS with Flickr images var newl = new OpenLayers.Layer.GeoRSS('georss.xml'); map.addLayer(newl); 05.06.09 Geo Maps - Martin Kelm 15
  • 16. 2.2.2.1. GeoRSS Example GeoRSS according to W3C standard 05.06.09 Geo Maps - Martin Kelm 16
  • 17. 2.2.3. Open Street Map Collection of free usable geo data Wiki-like database with edit functions Creative Commons Share-Alike 2.0 05.06.09 Geo Maps - Martin Kelm 17
  • 18. 3. Geo Maps papaya CMS (RC1 and nightly) Developement since mai 2007 Google Maps / Yahoo Maps integration Markers and keys management 05.06.09 Geo Maps - Martin Kelm 18
  • 19. 3.1. API Functions In Geo Maps - (De-)Activate / configure map controls - Set map type / size and zoom level - Arange / center map - Descriptions by using mouse-events - Lines (Polyline) - Static maps - Get map coordinates by click OnClick-Event / Description 05.06.09 Geo Maps - Martin Kelm 19
  • 20. 3.1.1. More Examples Get map coordinates to set them into a input field. Set polygon lines 05.06.09 Geo Maps - Martin Kelm 20
  • 21. 4. Geo Maps Modules Geo Maps modules overview in the papaya CMS backend 05.06.09 Geo Maps - Martin Kelm 21
  • 22. 4.1. Administration Markers management Keys / application IDs management 05.06.09 Geo Maps - Martin Kelm 22
  • 23. 4.1.1. Manage Markers 05.06.09 Geo Maps - Martin Kelm 23
  • 24. 4.1.2. Manage Keys / Application IDs Manage Google API keys and / or Yahoo application IDs 05.06.09 Geo Maps - Martin Kelm 24
  • 25. 4.2. Map Boxes Google Maps Box Yahoo Maps Box Configuration Get data from Output class Link-URLs and configuration (setter) XML-output (getter) Base class 05.06.09 Geo Maps - Martin Kelm 25
  • 26. 4.2.1. - Configure Map Boxes Settings / options for map presentation 05.06.09 Geo Maps - Martin Kelm 26
  • 27. 4.2.2. - Configure Map Boxes Markers data / markers settings 05.06.09 Geo Maps - Martin Kelm 27
  • 28. 4.2.3. - Configure Map Boxes More configuration possibilities 05.06.09 Geo Maps - Martin Kelm 28
  • 29. 4.2.4. Dynamic And Static Map Static map request -> URL maps.google.com/staticmap Paramter - center = LAT,LNG - zoom = 15 - size = 212x212 - maptype = roadmap - markers = LAT,LNG,red - key = API-KEY Dynamic with control element Static map image 05.06.09 Geo Maps - Martin Kelm 29
  • 30. 4.2.4.1. Dynamic Map Request (1) Load API Java Script with API-key 1. Check browser compatibility: GBrowserIsCompatible() -> TRUE / FALSE 2. Get div-element from document: var mapElement = document.getElementById(quot;mapquot;); 3. Get map object with map size setting: var googleMap = new Gmap2( mapElement, {'size' : new GSize(width, height)} ); 4. Set a valid map type: googleMaps.setMapType(mapTypeConstant); 05.06.09 Geo Maps - Martin Kelm 30
  • 31. 4.2.4.1. Dynamic Map Request (2) 5. Add a control element: googleMap.addControl(new GLargeMapControl()); 6. Get a point coordinate object: var point = new GLatLng( parseFloat(latitude), parseFloat(longitude)); 7. Center map: googleMaps.setCenter(point); 8. Set markers: var marker = new GMarker(point); (more parameters for own icon images available) googleMaps.addOverlay(marker); 05.06.09 Geo Maps - Martin Kelm 31
  • 32. 4.3. - Connector Base class Connector class Class of external module Methods: Folders list as combo selection box Add marker Delete marker 05.06.09 Geo Maps - Martin Kelm 32
  • 33. 4.3.1. - Connector Example Map- and special box Geo Maps output class M1 Geo Maps base class M2 Click-Event function (overloaded) function coorModeAction(x, y) { if (lastMarker != null) googleMaps.removeOverlay(lastMarker); lastMarker = setMarker(new GLatLng(y, x)); Geo Maps connector locationInput.value = y+','+x; } 05.06.09 Geo Maps - Martin Kelm 33
  • 34. 4.4. Geo Maps Database Tables 05.06.09 Geo Maps - Martin Kelm 34
  • 35. 4.4.1. Markers Data Output KML Description in HTML XMLHttpRequest Styles for Google Earth 05.06.09 Geo Maps - Martin Kelm 35
  • 36. 4.4.1.1. Export Markers Data Export function in backend Download by using a KML output mode (markers data page) KML contains styles to get a marker icon 05.06.09 Geo Maps - Martin Kelm 36
  • 37. 4.5. MySQL Spatial Extensions Functions: Creation, storage and analysis of geographic characteristics Since MySQL 4.1 (for MyISAM) Since 5.0.16 for InnoDB, NDB, BDB and ARCHIVE too 05.06.09 Geo Maps - Martin Kelm 37
  • 38. 4.5.1. SE Class Hierarchy Point: 0-dimensional Curve: 1-dimensional Surface: 2-dimensional GeometryCollection: Collection of different geometries 05.06.09 Geo Maps - Martin Kelm 38
  • 39. 4.5.2. Geo Maps Functions For SE Base class for Spatial Extensions - Create database table Column type: polygon (for points and polygons) Index: SPATIAL KEY - Add / remove points - Add / remove polygons - Get nearest point Column type: point Index: SPATIAL KEY - Is point a within polygon x? 05.06.09 Geo Maps - Martin Kelm 39
  • 40. 4.5.3. SE Database Tables Extension tables for MySQL Spatial Extensions or rather polygon- and point-data. 05.06.09 Geo Maps - Martin Kelm 40
  • 41. 5. Sources And Further Links martinkelm.de en.wikipedia.org/wiki/Google_Maps en.wikipedia.org/wiki/Google_Earth en.wikipedia.org/wiki/Yahoo_Maps en.wikipedia.org/wiki/Open_Layers openlayers.org/dev/examples www.georss.org/Main_Page dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html code.google.com/apis/maps/documentation/reference.html developer.yahoo.com/maps/ajax/V2/reference.html shrt.ws / weisse-liste.de ENDE 05.06.09 Geo Maps - Martin Kelm 41