Archive for December, 2009

Google Qualified Developer for Google Maps API

Posted on December 29, 2009. Filed under: GeoSpatial Training Services, Google Maps |

GeoSpatial Training Services recently earned the distinction of “Qualified Developer for the Google Maps API”.  Currently there are fewer than 50 developers worldwide to have earned this distinction.

The Google Qualified Developer Program was designed to recognize Google API and developer tool experts, and to provide those in need of development support with a directory of trusted references. Candidates are subjected to a rigorous evaluation process.  In additioni to passing an exam, candidates must show examples of their development work, evidence of community participation, and references who can vouch for their professionalism.

Achieving and maintaining qualification consists of requiring a minimum point level in four areas including professional references, active development projects, community participation, and a qualification exam.

Google currently provides Qualified Developer Programs for Google Maps, KML, Gadgets Ads, and AJAX Search API.

More Information
GeoSpatial Training Services provides e-learning and application development services for the Google Maps API.  Our e-learning courses include the freely distributed “Introduction to the Google Maps API“, “Advanced Google Maps API Programming“, and “Building Rich Google Maps Interfaces with Dojo“.  You can view all our e-learning courses on the Google Maps API here.

Advertisements
Read Full Post | Make a Comment ( None so far )

Bing Maps API Now with StreetSide Panoramas

Posted on December 18, 2009. Filed under: Uncategorized |

In a previous post we noted that Google Maps had added oblique imagery in both San Diego and San Jose with more metro areas to follow soon.  It didn’t take Bing Maps long to respond with their addition of streetside photography, the beta Silverlight version of Bing Maps, and enhanced Bird’s Eye. Pretty cool stuff!

Read Full Post | Make a Comment ( None so far )

GIS Application Designers: We Should All ‘KISS’

Posted on December 17, 2009. Filed under: Uncategorized |

As GIS application designers and developers we should all heed the advice in the simple figure below.  Resist the temptation to add in that extra widget that is just too cool to leave out!  And I’ll resist the temptation to sharp stick ESRI on this issue!  Tip of the hat to I’d Rather Be Writing.

…..every time you add something to an interface, you should take something away. Keeping the interface simple ensures you aren’t crowding out screen real estate.

Read Full Post | Make a Comment ( None so far )

Next Session of Mastering the ArcGIS Server JavaScript API Coming Soon

Posted on December 17, 2009. Filed under: ArcGIS Server |

Time is running out, but it’s not too late to register for our upcoming session of Mastering the ArcGIS Server JavaScript API.  This is an Internet based, instructor guided course which is self-paced.  Our next session begins January 11th and runs through February 16th.

Our most recent session of this course recently finished up and here are some comments from past course participants.

“I have attended a number of instructor lead training courses offered by ESRI, which are great in their own right, but the Mastering the ArcGIS Server JavaScript API course gets much more in-depth than they often do. Thanks for putting this course together and offering it at a great price.” — Jason Warzinik, GISP, GIS Manager, Boone County, MO

“The things you have taught me have helped tremendously on my project”. — Jeff Dobb, State of Montana

“I have enjoyed the class. I like working at my own pace through the materials, between the other things I am working on. The examples are clear, and I appreciate that I will be able to go back and refer to them during my development efforts. This training format seems to work, and I hope to participate in more of these in the future.” — Erick Johnson, GISP, GIS Programming/Analyst – Matanuska – Susitna Borough

“I’m impressed with the quality of the course and materials. I think they’re the best thing out there.” — Stephanie Stanfield – Farallon Geographics Inc.

“I strongly and highly recommend it.” — Matt Gubitosa – U.S. EPA

“This was an excellent course” — Jonathan Harahush – Denver Regional Council of Governments

Other Course Survey Results

Register Now

Government/Educational/Non-Profit – $715.00
Add to Cart

Commercial – $795.00
Add to Cart

You may also wish to consider our related “Building Web 2.0 Mapping Applications with ArcGIS Server and Google Maps” which has a somewhat different focus also beginning on January 11th.

Need more information?  Contact eric at geospatialtraining.com or you can call or text 210-260-4992.

You can save 10% on the registration costs.  Ask us how.

Read Full Post | Make a Comment ( None so far )

Spatial and Attribute Searches in Google Maps Data API

Posted on December 16, 2009. Filed under: Google Maps |

Based on this announcement from Google if you haven’t taken a close look at the Google Maps Data API yet you may want to consider doing so now with the addition of spatial and attribute search capabilities to the API.  Search Feeds, similar to Feature Feed URL’s, take the form:

Search Feed URL Example

Spatial queries can accept either a bounding box or a radius (from a lat/long center point) to use as the input geography for performing a searching.  Matched features within a defined area can also be sorted by distance from the input lat/long.  In the code below a bounding box is used as the input search geography.

Attribute searches can be implemented against a feature’s structured key/value pairs.  An array of key/value pairs are passed in to the query as seen below where we are searching for all features in a map containing the attributes pool: true and price:budget.

I don’t see mention of the capability of combining spatial and attribute queries but I would assume that you only need to include the appropriate parameters for each.

This is a nice addition to the Maps Data API and will make it a much more attractive platform for web mapping applications.  Obviously it doesn’t provide advanced search capabilities, but for simple applications it is an attractive solution.

Read Full Post | Make a Comment ( None so far )

Google Fusion Tables API Integration with Maps and Visualization APIs

Posted on December 16, 2009. Filed under: Google Fusion Tables, Google Maps, Google Visualization API |

Google announced this week that Fusion Tables now has its own API.  Fusion Tables, still in Google Labs, allows you to upload data sets from spreadsheets or CSV files and visualize the data on maps, timeslines, and charts.  In addition, the collaborative nature of Fusion Tables enables you to not only share data with other organizations, but also merge your data with other user datasets, embed comments, and allow collaborative editing of the data.

Now, obviously Google Docs has been around awhile so uploading your spreadsheet data to this type of application is nothing new, but the compelling thing about Fusion Tables is its integration with the Google Maps API and Google Visualization API.  Visualizations are also real time as Fusion Tables automatically updates data as it is updated or corrected.  With the Fusion Tables API you can also update or query the database programmatically.  Data can also be imported from various data sources including text files and relational database management systems.

I think we’ll see a lot of good web mapping applications built with a combination of Fusion Tables, Google Maps, and Google Visualization perhaps tied together with Google App Engine.  In the announcement Google referenced the Open Data Kit project which uses Google App Engine and the Fusion Tables API to instantly map locations of survey results gathered from GPS-enabled cell phones or survey software.

Read Full Post | Make a Comment ( 1 so far )

Austin Marathon Mashup with Google Maps, USGS Elevation Data, and ESRI Elevation Service

Posted on December 10, 2009. Filed under: Uncategorized |

I’m training for the upcoming Austin Marathon and Half Marathon and thought it would be cool to put together a simple mashup showing elevation information for the course.  The terrain for this particular race can be pretty challenging.  So, what I’ve done is put together a quick mashup using a variety of resources including the Google Maps API, the USGS Elevation Query Web Services, an elevation profile REST service from ESRI, and Dojo to tie everything together.  It’s nothing fancy, but you can see the final product here.

To find the elevation at any mile marker along the marathon route simply click the marker and the application will query the USGS Elevation Query Web Service to determine the elevation in meters at that point.  To see an elevation profile for the entire course, click the ‘Get Elevation Profile’ button which uses the ArcGIS JavaScript Extension for the Google Maps API along with the ProfileService task.

In this post I’ll detail how I quickly put together this mashup.

Google Maps API
Obviously the base map for this mashup is Google Maps so we reference the API to create our map and then add the marathon mile markers and route.  I’m not going to go into much detail on creating the base map.  If you need basic information on the Google Maps API you can download a free copy of our Introduction to the Google Maps API e-learning course.  I will point out that we are reading in the mile markers for the marathon from an XML file as seen in the code example below.  For more information on reading XML files from Google Maps please review a previous article on the subject.

We follow a similar process for adding the marathon route wherein we create a new instance of GPolyline by feeding in an array of GLatLng objects that define the route.

ArcGIS JavaScript Extension for Google Maps
Next, to display a terrain profile for the marathon route we are going to use the ProfileService which is a task published by ESRI.  To take advantage of this task we need to import a reference to the ArcGIS JavaScript Extension for Google Maps which allows you to plot the results of a geoprocessing task like the ProfileService on top of a Google Map.  Below you will see the reference to this API.

Next, we need a reference to the ProfileService.

The ‘Get Elevation Profile’ button triggers a call to the ‘generateProfile()’ function seen below.

I will call your attention to a few lines of code in generateProfile().  The first line creates a new instance of the Google Maps API object GPolyline by calling a JavaScript function which loads the points of inflection for the marathon route.

The next few lines below that create ArcGIS Server JavaScript API objects for FeatureSet and Feature.  The instance of FeatureSet is created by referencing the GPolyline object that we initially created in the function.  Finally, we create various task parameters that will then be used as input when we execute the task against ProfileService.

Task parameters include the instance of FeatureSet that we created from our GPolyline object along with parameters to define the output image width and height of the profile and a boolean value indicating whether or not we want the segments of the route to be displayed in the elevation profile.  We do not in this case because the large number of points that define the route will simply clutter the output terrain profile.  Our last line of code in this function calls the execute() method against profile task.  Note that we feed in our task parameters, a second parameter that indicates whether or not we want the results to be returned as KML in the form of a GGeoXml object, and finally a callback function that will execute when the task has finished.  ProfileService is a synchronous task meaning that the application will wait until the results have been returned to continue functioning.  In this case, the function profileCallback() will be run against the results of the service.

A FeatureSet object is returned from the task.  In this case, the FeatureSet contains a Feature which represents the marathon route.  A Feature can contain both the geometry of the feature as well as attribute information.  In this case we aren’t concerned with the geometry since we already know the marathon route.  The attributes though contain the terrain profile information including a path to the URL where the output terrain profile image was placed along with some additional information that describes the profile.  Finally, as is indicated in the highlighted section of the profileCallback function above we define an HTML snippet in the form of a <div> tag that contains a pointer to the URL of the terrain profile image along with the profile description.  This HTML is then placed inside a Google Maps API info window and displayed at the center point of the route.

USGS Elevation Query Service
Clicking a mile marker or any point along the route triggers a call to the USGS Elevation Query Service and displays the results just above the map.  To access the USGS service we are going to use the dojo.io.script.get() method which is part of the Dojo JavaScript framework.  We’ve written extensively about the Dojo framework on this site and provide a general overview here.  Take a look at the code below and then we’ll discuss how this is accomplished below.

We are going to wrap everything inside a Google Maps event listener which ‘listens’ for a click on the map.  You can see this in the first line of code above.   Events in Google Maps are registered with the GEvent object and the addListener() method.  The addListener() method takes three parameters.  The first is the object (an instance of GMap2 in this case), the second is the event to listen for on the object, and the final parameter is a function that will run in response to the event.  So in general terms we are setting up a function that will execute anytime the user clicks the map.  We need this event listener to detect when the user clicks on a mile marker or a point along the route.  Inside the function is where all the work takes place to respond to the event.  I’ll draw your attention to a few pertinent lines.  We need a reference to the USGS Elevation Query and we provide that in the first line that I have highlighted above.  However, this provides only the base URL.  We also need to append the latitude and longitude where the user clicked to the URL and this is accomplished in the second line that I have highlighted above.  Now, in this case we are only providing the elevation for a mile marker or a point along the route rather than any point the user clicks on the map.  The ‘click‘ event on GMap2  passes different arguments based on the context of the click, and whether or not the click occurred on a clickable overlay.  You can see this in the event listener below.

If the click does not occur on a clickable overlay (this would be GMarker, GPolygon, GPolyline, or GInfoWindow), the overlay argument is null and the latlng argument contains the geographical coordinates of the point that was clicked. If the user clicks on an overlay that is clickable (GMarker or GPolyline in our case), the overlay argument contains the overlay object, while the overlaylatlng argument contains the coordinates of the clicked overlay.

So for our application we only want to call the USGS Elevation Query if the use has clicked on a mile marker (GMarker) or a point along the route (GPolyline).  That accounts for our ‘if’ statements on ‘overlay’ and ‘overlayLatLng’ as seen in the code example above.

That was a bit of a lengthy description about a small subject in the overall scheme of the application, but it was necessary to fully describe the GMap2.click event.

Now we get to the heart of the matter which is calling the USGS Elevation Query Service with the latitude, longitude coordinate pair of either a mile marker or a point along the route.  Here is where we are going to make use of Dojo and its capability of making cross-domain requests with JSONP.  JavaScript’s XmlHttpRequest object does not allow you to load data from outside of the page’s current domain because of the same origin policy.  However, it turns out that <script> tags are not subject to the “same origin” policy.  JSONP is an informal standard that that has been developed to allow data to be take advantage of cross-domain loading.  Dojo provides the dojo.io.script.get() method to handle JSONP functionality.  Refer again to the code above and pay particular attention to the final area that I have highlighted in the listener function.  The get() method takes a single object literal parameter that can contain various properties including the url that will be called (http://ws.geonames.org/srtm3JSON?lat=<lat coordinate>&lng=<lng coordinate>).  Other properties of note include  ‘load’ and ‘error’ functions.  The ‘load’ function is passed a response object which in our case will contain the elevation of the point that was clicked.  The ‘error’ function would, as its name implies, be called in the event of an error.  Our ‘load’ function takes the elevation value passed in the response object and places it inside our web page as seen below.

So there you have it.  A simple, but useful mashup for obtaining elevation information related to the upcoming Austin marathon.

More Information
If you’d like more information about using Google Maps with ArcGIS Server you may wish to consider our upcoming Internet based, instructor guided course, Building Web 2.0 Mapping Applications with ArcGIS Server and Google Maps. You’ll learn how to build applications that integrate these technologies to display your existing GIS data in Google Maps.  We also offer a similar class (Mastering the ArcGIS Server JavaScript API), but more focused on developing web mapping applications with the ArcGIS Server JavaScript API.  Both classes begin January 11th, 2010.

Read Full Post | Make a Comment ( 1 so far )

Google Maps Adds Oblique Aerial Imagery

Posted on December 8, 2009. Filed under: Uncategorized |

The one big advantage that I always felt Bing Maps had over Google Maps was the inclusion of its Bird’s Eye View oblique imagery.  Looks like that advantage is going away as Google Maps has finally added oblique aerial imagery.  For now the imagery is only available for San Jose and San Diego, but you can expect that to be built out further in the coming months.

Don’t you think this

Petco Oblique

Oblique View of Petco Park

is better than this?

Petco Regular

Satellite View of Petco

Also note the addition of  a compass ring on GLargeMapControl3D that enables users to rotate the imagery from different directions.

Adding an oblique perspective to your Google Maps application is really very simple as you can see from the code example below.  Simply use one of the existing map types that support aerial perspective imagery (G_SATELLITE_MAP or G_HYBRID_MAP) and call GMap2.enableRotation().  Obviously you would also need to be zoomed into an area that currently support oblique imagery as well.

Read Full Post | Make a Comment ( None so far )

Mapping API Directory from ProgrammableWeb

Posted on December 1, 2009. Filed under: Uncategorized |

Looking for mapping APIs to support your web application development efforts? Programmable web has a listing of nearly 100 mapping APIs and over 2000 mapping mashups. All the usual suspects including ESRI, OpenLayers, Google Maps, Bing, and CloudMade are on the list, but there are a lot of less well known entries. Some of the APIs that caught my eye:

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...