Archive for December, 2009
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.
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.
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 )
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.
Read Full Post | Make a Comment ( None so far )
…..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.
Our most recent session of this course recently finished up and here are some comments from past course participants.
“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
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 )
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:
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 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 )
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.
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.
Next, we need a reference to the ProfileService.
The ‘Get Elevation Profile’ button triggers a call to the ‘generateProfile()’ function seen below.
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
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.
So there you have it. A simple, but useful mashup for obtaining elevation information related to the upcoming Austin marathon.
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
is better than this?
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 )
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:
- USGS Elevation Query Service
- BigTribe (Location based advertising)
- HeatMapAPI (I discussed this one in greater detail here)
- HopStop (Mass transit and walking directions)
- Pushpin and Pushpin Location Data
Sold recently to Apple
- TownMe Geo (Business listings, POI, reverse geocoding)
- YourStreet (Geocoding news article service)