Map Scripting 101 Examples
Chapter 1: Mapping Basics
- Google Map
- Yahoo Map
- Mapstraction Map
- Resize the map
- Add controls
- Map Type setting/controls
- Get and set zoom
- Re-center the map
Chapter 2: Plotting Markers and Message Boxes
- #1 Basic marker
- #2 Remove/hide marker
- #3 Show a message box
- #4 Open and close a message box
- #5 Use a custom marker icon
- #6 Use numbered markers
- #7 Loop through all markers
- #8 Auto-center based on markers
- #9 Filter out certain markers
- #10 Remove or hide all markers
- #11 Handle clusters of markers (Google V2)
Chapter 3: Geocoding
- #12 Geocode with JavaScript (Google V2)
- Geocode user input (Google V2)
- #13 Google Web Service with PHP
- Yahoo Web Service with PHP
- #14 Reverse Geocode with JavaScript (Google V2)
- Reverse Geocode with Google Web Service in PHP
- #15 Get Postal Code Coordinates
Chapter 4: Layer it On
- #16 Draw Lines on a Map
- #17 Draw Shapes on a Map
- #18 Add Circles to Show Search Radius
- #19 Draw a Rectangle to Declare an Area
- #20 Draw Lines Along Clicks
- #21 Draw States/Countries on a Map
- #22 Add Custom Controls
- #23 Create Your Own Zoom Interface
- #24 Plot Image Thumbnails on a Map
- #25 Overlay an Image on a Map
- #26 Use Custom Tiles
Chapter 5: Events
- #27 The User Clicks the Map
- #28 The User Drags the Map
- #29 The Zoom Level Changes
- #30 A Markers is Added or Removed from the Map
- #31 A Polyline is Added or Removed from the Map
- #32 The User Opens or Closes a Message Box
- #33 The User Clicks a Marker
- #34 Return to the Center When a Message Box is Closed
- #35 The User Moves the Map Outside Preset Bounds
Chapter 6: Explore Proximity
- #36 Calculate Distance Between Two Points
- #37 Find True Distance with Routing
- #38 Create Driving Directions
- #39 Determine Nearest Marker
- #40 Find a Point Along a Line
- #41 Plot Local Results on a Map (Yahoo)
- #42 Retrieve Local Results with HTTP (Yahoo)
- #43 Check Whether a Point is Within a Bounding Box
- #44 Get a Random Point Within a Bounding Box
See get_random_by_bounds function in Determine Nearest Marker - #45 Check Whether a Point is Within a Shape
- #46 Get Nearest Locations from our Own Database (MySQL)
Chapter 7: User Location
- #47 Ask Users Where They Are
- #48 Get Location Using JavaScript
- #49 Use Fire Eagle to Get Location
- #50 Get Location by IP (Google V2)
- #51 Roll Your Own IP Database
Chapter 8: Data Formats
- #52 Use XML
- Parse XML with jQuery JavaScript Library
- Parse XML with PHP
- #53 Use JSON
- Parse JSON with JavaScript and jQuery
- Parse JSON with PHP
- #54 Use GeoRSS
- #55 Use KML
- #56 Use GPX
- #57 Convert from XML to JSON
- #58 Filter, Merge, and Sort Data with Yahoo Pipes
Chapter 9: Go Server-Side
- #59 Install PHP
- #60 A Quick PHP Introduction
- #61 Retrieve a Web Page
- #62 Install MySQL
- #63 Store Locations to a Database
- #64 Import Data from a Spreadsheet
- #65 Use MySQL from PHP
- #66 Plot Locations from a Database
- #67 Get Nearest Locations from a Database
- #68 Get Nearest Locations to a Postal Code
Chapter 10: Mashup Projects