In my previous MapQuest posts I've mostly been demonstrating how to use MapQuest to display the the various types of geo-formats (KML, GeoRSS, etc). Building on the examples of map event interaction from my previous posts, we can also build an interactive map interface where users can build their own geo-format files. Here's an example where users can interactively click on the map to create a polyline.
JavaScript API 5.3RC3 Released: Traffic, Remote Collections and More!
This morning we released an update to the MapQuest JavaScript API. Version 5.3, Release Candidate 3 contains the following new functionality:
- Drop Shadow setting for the map: We've added a visual drop-shadow graphic to the map, that you can turn on by calling
map.setMapShadowState(boolean). This shadow is off by default. - Remote Collections: KML and GeoRSS support built into the API! Create a
RemoteCollection, tell it the location of the feed and its format, and watch it get automagically sucked onto the map! If you have another format, feel free to extend the feed loading classes to create your own loadable formats. - Min/Max Zoom levels on POIs: You can now set minimum and maximum zoom levels on POIs. The POI would then only be visible on the map between the set zoom levels.
poi.setValue('minZoomLevel', x) poi.setValue('maxZoomLevel', x) - Show Traffic Flow on the Map: You can now add traffic flow to your map. This is the first step of adding traffic functionality into the API - more will follow.
- Show Traffic/Incident POIs on the Map: You can now add traffic incident POIs to your map. This is the second step of adding traffic functionality into the API - more will follow.
Are you starting to see a pattern here?
To use this version, change the version parameter in the API request to "v=5.3.0_RC3":
<script src="http://btilelog.access.mapquest.com/tilelog/
transaction?
transaction=script&key=YOUR_KEY_HERE&ipr=true&itk=true
&v=5.3.0_RC3" type="text/javascript"></script>
Customize Your Trail Maps Using MapQuest and KML
I've always liked maps, but I've always been disappointed with the content. Sure, knowing road names and where to find a gas station is great. But I'm an outdoors kind of guy, and what I really want to see is cool biking and hiking routes. That's why I'm so excited about Keyhole Markup Language (KML) and the MapQuest Platform; the combination of the two lets users, as opposed to mapmakers, supply map content. Overlaying a map with KML data opens up many possibilities for uploading, sharing, and finding user-generated content. Couple this ability to share data with the vast number of people carrying GPS-enabled devices and you have a perfect storm for sharing off-road routes.
In this article, I show how to read KML files and create map features by using the MapQuest JavaScript API. The example I'm presenting is a KML file that describes the route for the Appalachian Trail (AT) and the location of shelters hikers use for overnight stays. I've focused on my favorite part of the trail, which is the section between Front Royal, VA, and Harper's Ferry, West Virginia. The source code for the example is listed at the end of this article. The following screen shot shows my custom AT map in action:
Continue reading Customize Your Trail Maps Using MapQuest and KML
Beta Update: 5.3 Release Candidate 2 Released!
Turn Your World Upside Down
Let's talk briefly about globes. You know, those ones that sit in libraries in period piece movies where some old guy in a leather chair sits next to it, smoking a pipe and calling Shakespeare a hack? Those globes. The ones where when you see them, you can't help but spin it as hard as you can in the slim hope the momentum will send it rolling across the room.
Well you can now create and spin your own virtual globe. We fixed a bug in the new full-axis globe view so you should now see improved performance when trying to spin it off your web page.
KML and GeoRSS Support: We got it.
Create a RemoteCollection, tell it the location of the feed and its format, and watch it get automagically sucked onto the map! And if you have another format, feel free to extend the feed loading classes to create your own loadable formats. Sorry, LOLcode support is still a no-go.
But wait, there's more!
Here's the list of other major updates in the just released 5.3rc2 Beta update of the MapQuest Platform:
- Beta Issues Forum now available - A forum for posting about Beta has been created in the Technical Resource Center.
- Old POI & Overlay Getters/Setters restored (JavaScript) - We've added back in the 5.2 getters and Setters for POIs and Overlays.
- POI & Overlay getValue & setValue methods added (JS and FUJAX) - The new
getValueandsetValuefunctions have been added to the POI and Overlay objects in FUJAX so that both the old, and the new methods of setting properties on these objects are now available in both JavaScript and FUJAX. - Multiple Collections (JS, AS3, FUJAX) - Building on our efforts last month to combine
POICollectionsandOverlayCollectionsinto a singleShapeCollection, you can now add multipleShapeCollectionsto a map.
Check out more information and samples on the MapQuest Developer Network Beta page.