Create Your Own Google-like MapsMichael BakerSenior ConsultantThursday, September 2, 2010
Why Build a Google-like Mapping Application?    Have you ever:       –    Wanted your mapping application to have the sam...
History of Web Mapping: Pre - 2003  History of Maps on the Web (2003)                                                    T...
History of Web Mapping: 2003 – PresentMaps on the Web 2003 to Present                                                     ...
How Does Google Maps Work?Thursday, September 2, 2010                                5
Development History of Google Maps    Google Maps first started as a software application developed by Lars and Jens Rasm...
Performance - It Is All About the Cache!    The map within Google Maps consist as a set of tiles    These tiles cover th...
How Much Cache?    Tiles do not cover all regions at all zoom levels    Different areas of the map may contain tiles at ...
Zoom Levels    At the lowest zoom level (0), one tile represents the entire earth    Each succeeding zoom level divides ...
Spherical Mercator    The coordinates in Google Maps and which are presented to the users is Latitude/Longitude     in WG...
Addressing Tiles    There are three coordinate systems that Google uses:       –    Pixel coordinate referencing a point ...
Why Would You Not Use Google?    Why as a website developer, who controls all aspects of your site, would you allow a big...
If Not Google Maps, What?    The key is to understand the map     stack    Modern online mapping applications           ...
Tile Cache    A tile cache is a server that sits between the browser and the map server.    It checks to see if a reques...
Map Server    A map server is an application that takes geospatial data as input and renders graphical     output.    Th...
Geospatial Data    The building blocks of any mapping application are the databases that define the points, lines,     an...
How Do I Create a Google Maps-like ApplicationThursday, September 2, 2010                                         17
Performance – Need Cache    Map caching is a very effective way to make maps run faster.    When you create a map cache,...
Tile Caching Review    Advantages       –    Performance       –    Quality                 Performance isn’t affected b...
Thinking about Cache    Need to think about the layers of the map    Design your map for the scale to be viewed.    Uti...
Utilize Open Source Tools    Remember the map stack       –    Browser UI       –    Tile Cache                          ...
Summary    Google Maps is a great application. However, it has limitations.    Organizations have spent a tremendous amo...
Questions?Thursday, September 2, 2010                23
Upcoming SlideShare
Loading in …5
×

Hawaii Pacific GIS Conference 2012: Internet GIS - Create Your Own Google Like Maps

458 views
396 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
458
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Hawaii Pacific GIS Conference 2012: Internet GIS - Create Your Own Google Like Maps

  1. 1. Create Your Own Google-like MapsMichael BakerSenior ConsultantThursday, September 2, 2010
  2. 2. Why Build a Google-like Mapping Application? Have you ever: – Wanted your mapping application to have the same navigation as Google Maps? – Wanted the same speed and performance as Google Maps? – Wanted to see your vector data in Google Maps? – Wanted to see your imagery in Google Maps?Thursday, September 2, 2010 2
  3. 3. History of Web Mapping: Pre - 2003 History of Maps on the Web (2003) The Natio nal A tlas o f TerraServer USA Canada Flash P layer 5 Java 1.0 B irth o f the WWW SVG 1.0 M apQuest First web bro wser A uto desks M apGuide 1989 1991 1993 1995 1997 1999 2001 2003 Xero x P A RC M apserver ESRIs A rcIM S 3.0 Intergraphs Geo M edia HTM L 1.0 HTTP 1.0 WebM ap 1 .0 Netscape bro wser ESRIs M ap Objects (M o saic)Thursday, September 2, 2010 3
  4. 4. History of Web Mapping: 2003 – PresentMaps on the Web 2003 to Present SVG 1.2 Yaho o ! M aps A P I Go o gle M aps Go o gle M aps A P I2003 2004 2005 2006 2007 Firefo x 1 (native SVG) .5 Go o gle Earth Windo ws Live Lo cal Term Web 2.0 intro ducedThursday, September 2, 2010 4
  5. 5. How Does Google Maps Work?Thursday, September 2, 2010 5
  6. 6. Development History of Google Maps Google Maps first started as a software application developed by Lars and Jens Rasmussen for the company Where2. In October 2004 the company was acquired by Google where it transformed into the web application Google Maps. The application was first announced on the Google Blog on February 8, 2005. It originally only supported users of Internet Explorer and Mozilla web browsers, but support for Opera and Safari was added on February 25, 2005. Currently Internet Explorer 6.0+, Firefox 2.0+, Safari 3.1+, and Google Chrome are supported. It was in beta for six months before becoming part of Google Local on October 6, 2005.Thursday, September 2, 2010 6
  7. 7. Performance - It Is All About the Cache! The map within Google Maps consist as a set of tiles These tiles cover the entire earth at each zoom level Tiles exist for each map type: – Street map – Satellite map – Hybrid map – Physical mapThursday, September 2, 2010 7
  8. 8. How Much Cache? Tiles do not cover all regions at all zoom levels Different areas of the map may contain tiles at varying resolutions and therefore varying zoom levels Tile coverage of any map type varies based on location – For example, many areas of the Pacific Ocean do not appear at high zoom levels, while Honolulu may have very detailed mapsThursday, September 2, 2010 8
  9. 9. Zoom Levels At the lowest zoom level (0), one tile represents the entire earth Each succeeding zoom level divides the map into 4N tiles, where N refers to the zoom level – Zoom level 1, divides the world up into a 2x2 grid for a total of 4 tiles – Zoom level 2, divides up the world into a 4x4 grid for a total of 16 tilesThursday, September 2, 2010 9
  10. 10. Spherical Mercator The coordinates in Google Maps and which are presented to the users is Latitude/Longitude in WGS84 Datum For tile publishing, a Mercator projection is used. Why Mercator? – Mercator projection significantly distorts scale and area – It has two important properties:  It is a conformal projection – Preserves the shape of relatively small objects  It is a cylindrical projection – North and south are always straight up and down, and west and east are always straight left and right Since the Mercator projection goes to infinity at the poles, it does not actually show the entire world. – Maximum latitude is approximately 85.05 degreesThursday, September 2, 2010 10
  11. 11. Addressing Tiles There are three coordinate systems that Google uses: – Pixel coordinate referencing a point on an image tile – Tile coordinates referencing a tile within a tile layer – The zoom layer, which defines the total number of tiles This is often referred to as Google XYZThursday, September 2, 2010 11
  12. 12. Why Would You Not Use Google? Why as a website developer, who controls all aspects of your site, would you allow a big alien blob on your site? – You accept whatever colors, fonts and map layers Google chooses – You do add some custom markers and overlays but fundamentally, the map itself is out of your hands Google’s choices about what to display on the map may not work for your application You are limited to Google API’s terms and conditions You are limited to what Google wants to implement You so have much invested in your dataThursday, September 2, 2010 12
  13. 13. If Not Google Maps, What? The key is to understand the map stack Modern online mapping applications Browser UI adhere to this architecture HTTP Server There are four major components of the map stack: – Browser UI – Tile Cache Tile Cache – Map Server – Geospatial data Tile Server Map Server Geospatial Data Application ServerThursday, September 2, 2010 13
  14. 14. Tile Cache A tile cache is a server that sits between the browser and the map server. It checks to see if a requested map tile is already generated so it can be served up quickly. If the map tile is not already generated, the tile cache gets it from the map server and saves it for future requests. The tile cache may be considered as one half of a layer in the map stack. It is not technically required.Thursday, September 2, 2010 14
  15. 15. Map Server A map server is an application that takes geospatial data as input and renders graphical output. The map server allows the user creative control of the final map. Map servers can be exposed directly to the internet or can be hidden from direct access by the tile cache layer in the stack.Thursday, September 2, 2010 15
  16. 16. Geospatial Data The building blocks of any mapping application are the databases that define the points, lines, and polygons that represent real-world places, roads, and areas.Thursday, September 2, 2010 16
  17. 17. How Do I Create a Google Maps-like ApplicationThursday, September 2, 2010 17
  18. 18. Performance – Need Cache Map caching is a very effective way to make maps run faster. When you create a map cache, the server draws the entire map at several different scales, and stores copies of the map images. The server can then distribute these images whenever someone asks for a map.Thursday, September 2, 2010 18
  19. 19. Tile Caching Review Advantages – Performance – Quality  Performance isn’t affected by how much detail is on the map – Industry standard  Tile caching is becoming an industry standard Disadvantages – Takes time to generate the tiles When should you cache? – If the data you see on the map needs to be live, with no time delay acceptable, then caching is not appropriate. Although the cache represent pictures of the data, you can still run operations on your map and your data. These operations will query the server and return the results. Results will be drawn on top of the cached image.Thursday, September 2, 2010 19
  20. 20. Thinking about Cache Need to think about the layers of the map Design your map for the scale to be viewed. Utilize the style properties at each scale. Choose your largest scale carefully. This will show the most detail and take the longest to process.Thursday, September 2, 2010 20
  21. 21. Utilize Open Source Tools Remember the map stack – Browser UI – Tile Cache Browser UI – Web Server – Geospatial Data HTTP Server There are a couple of commercial / open source tile caching solutions Tile Cache Tile Server Web Server Geospatial Data Application ServerThursday, September 2, 2010 21
  22. 22. Summary Google Maps is a great application. However, it has limitations. Organizations have spent a tremendous amount of money collecting and maintaining their data. It is not difficult to create your own Google-like mapping application. The key is to understand the elements of the map stack. Remember scale and layer definitions.Thursday, September 2, 2010 22
  23. 23. Questions?Thursday, September 2, 2010 23

×