The Pushpin API Blog was created to help track new releases, updates and features, bug fixes, and upcoming developments to the Pushpin API. As well, common API and JavaScript / AJAX problems and techniques will be discussed. All posts will be submitted by our development team. Feel free to send feedback or questions to our
support team.
The wait is over...maps of Canada have been added! Here's an example showing Toronto. We've gone with a different cartographic style than the US maps, with softer colors that look a lot better. If you zoom in all the way, you'll also see gray blocks that represent buildings.
We've bumped up our API to Version 1.1 this month. Most of you will get the new version automatically if you're using a development key. The documentation page for this version can be found
here. Here are the key features included in this release:
- The API now has the ability to add shaded polygons! This is reflected in the new class PPolygon. This works just like PPolyline but has an extra argument for the fill color.
- Polylines and polygons are rendered on the client-side now, with better performance and smoother lines and better anti-aliasing.
- We've added a smoother map panning effect that we think feels a lot nicer than before. We'll be adding options to control the panning in the future.
There's a new
demo page on our site that highlights a whole range of easily customizable map styles and features that Pushpin offers.
In addition to Moran's post for distance related functions, here are some more new functionalities for the API:
- We've created functions that assist with reading and manipulating XML data. Click here for an example.
- New class PXmlHttp creates a browser independent
XmlHttpRequest object.
- New class PXml parses XML text and extracts fragments.
- New classPXslt applies XSLT stylesheets to XML documents.
- New global function PDownloadUrl that retrieves an XML file asynchronously from a URL.
- New function
printImage() in PMap that allows you to save maps as images for printing. Click here for an example.
- Maps now have the Pushpin logo on the bottom right by default. To remove or replace this with your own logo, use the new optional
logo argument when creating a new PMap.
- More examples on the documentation page have been created (you can find them in the example column next to the functions in the class reference section). Our goal is to have at least one example for every function.
Distance is a critical part of mapping data and functionality. While latitude and longitude are comfortably
used by GIS professionals, most people think of geography in terms of distances. It's often the case
that user's expect to communicate with applications with miles/kilometers and not latitude and longtitude. E.g.
find me all the stores within five miles of where I clicked.
We've exposed new functions that allow you to take advantage of this:
Here's an example that plots pins on the map based on the center coordinate of the map and a radius of 500 meters
when you
click.
Alaska and Hawaii maps have been updated for the basic single layer maps (using the latest TIGER data), which includes more features and updated street data.