Pushpin API Blog
API Documentation
API Blog Archives
Latest Posts
Oct – Dec 2007
Jul – Sep 2007
Apr – Jun 2007
Jan – Mar 2007
Oct – Dec 2006
Jul – Sep 2006
Apr – Jun 2006
Contact us


(c) 2008 Placebase, Inc.


Right click bug in IE

Posted by Moran Ben-David - 09/28/06 17:10:52

We fixed a small bug in IE where right clicking inside a map returned a JavaScript error.

More functions for Version 1.0

Posted by I Wei Lai - 09/27/06 19:45:13

Here are some more new functions for the API:
  • New function fromLatLngToDivPixel() in PMap for converting geographical coordinates to pixels.
  • New function fromDivPixelToLatLng() in PMap for converting pixels to geographical coordinates.
  • New function equals() in PPoint for comparing two PPoint objects.
  • New function equals() in PSize for comparing two PSize objects.
  • New function min() in PBounds that returns a PPoint of the top left coordinate.
  • New function max() in PBounds that returns a PPoint of the bottom right coordinate.
  • New function toSpan() in PLatLngBounds that returns the size of the bounds.
  • New function getCenter() in PLatLngBounds that returns the center of the bounds.
  • Removed functions startDemo() and stopDemo() in PMap since it seems like most people prefer to customize and write their own demo mode. For reference, you can see one that we created.

New API Version 1.0 Released!

Posted by I Wei Lai - 09/26/06 16:51:19

We've released a new version of the API (1.0) that includes some new classes, function name changes, and a different zoom level order. Version 1.0 is backwards compatible so your old code should still work as expected. You will need to sign up for a new key to be able to develop with this version. Here is a detailed list of changes:
  • New class PLatLng for geographical coordinates. Previously, PPoint was used to represent both pixel and geographical coordinates. All functions that previously used PPoint for geographical coordinates have now been switched over to take PLatLng.
  • New class PLatLngBounds for bounds in geographical coordinates. The old PBounds class should only be used for pixel bounds.
  • Function getCenter() in PMap, renamed from getCenterLatLng().
  • Function getBounds() in PMap, renamed from getBoundsLatLng().
  • Function getZoom() in PMap, renamed from getZoomLevel(). The zoom level order is now the reverse of before (i.e. zoom level 0 is the most zoomed out).
  • Function setCenter() in PMap, renamed from centerAndZoom().
  • Function panTo() in PMap, renamed from recenterOrPanToLatLng().
  • Function setZoom() in PMap, renamed from zoomTo().
Also, some predefined object names have been changed and are now accessed via their class, e.g. PMapLayer.BASE instead of map.P_MAP_LAYER_BASE. The revised catalog will show the new way to access these objects.

We're working on more features and functions to add to this version as we speak, so please check back often.

"Bridge" code for other APIs

Posted by Moran Ben-David - 09/21/06 07:55:09

We've been adding code that will translate functions from other mapping APIs (such as Google Maps, Yahoo and Microsoft) to the corresponding functions in the Pushpin API. We've noticed a lot of cases where developers were already using another mapping API so this provides an easy way to "bridge" the two. The bridge code isn't part of the main API, so if you need it, let us know and we'll give you a link to a JavaScript file to include.

Added a new control for switching between map types

Posted by I Wei Lai - 09/14/06 12:07:16

Added PMapTypeControl which is a control that appears on the top right corner of the map when added, and allows you to toggle between the normal and satellite map types.

Creating custom zoom levels for map types

Posted by I Wei Lai - 09/12/06 15:18:18

We've exposed a function for setting the scales and zoom levels for map types which we think will be useful. This is done by using the setScales() function in PMapType. You can go here to see an example. We currently have these scales available for most of our layers.

Merging layers on the client side

Posted by I Wei Lai - 09/08/06 16:35:13

As you know, our tiles so far have been merged on the server and then passed to the client to be displayed. It occured to us that a way to merge layers on the client side might come in handy too, especially if your application involves a lot of layer toggling. With server side merging, turning a layer off involves refreshing the map because a different list of layers needs to be submitted to the server. With client side merging, turning a layer off is handled by the browser directly, essentially like removing a div element. The only drawback for client side rendering is that a large amount of layers might be too much for the browser to handle and could cause slow maps. There's also flexibility to create map types that contain a hybrid of both server and client merged layers. You can see an example and read more about this here.

Different map types can share the same map layers

Posted by Moran Ben-David - 09/06/06 13:36:43

This was a popular request so we've come up with a fix for it. Previously, a PMapLayer object could only belong to one PMapType which meant that map types would have to contain separate instances of the same layer. For example, P_MAPTYPE_NORMAL and P_MAPTYPE_SATELLITE contained different instances of P_MAPLAYER_POLY so turning the layer off in P_MAPTYPE_NORMAL did not affect the layer in P_MAPTYPE_SATELLITE. Now, they share the same layer object, so changes to the that layer is reflected in both map types. Anytime you want to create a new instance of a layer, use new PMapLayer() and add that to a map type.

Fixed Mercator latitude bug

Posted by John Leslie - 08/21/06 22:35:39

Fixed a bug where the latitude coordinate was not accurately translated on the map when using the Mercator projection maps.

Added setIndicatorListByIds() function

Posted by I Wei Lai - 08/16/06 17:40:25

Added a new function setIndicatorListByIds() in PMap that is a quick way to add an array of indicator ids to the indicator widget. Click here to see available indicators. This function does not need a callback function or PIndicatorLoader but does not make the PIndicator properties available.

Added PIndicatorLoader class

Posted by Moran Ben-David - 08/15/06 18:03:23

Added a new class PIndicatorLoader that loads an array of indicators (thematic variables) with a single request to the server, and passing it to a callback function. Click here for examples on how to use this.

Window resize bug fixed

Posted by I Wei Lai - 08/11/06 11:55:34

Fixed a problem with map controls not positioning properly when a browser window was resized.

Rendermap™ Official Release

Posted by I Wei Lai - 08/07/06 08:42:31

We also launched another product today called Rendermap which offers custom pre-rendered map tiles. These tilesets can then be displayed as map layers in the API or used in your own application. You can design your own map styles or let us design it for you, and use your own data or choose from our library of data. Dataplace™, a site for the Fannie Mae Foundation (and partly developed by us), will be using Rendermap to pre-render their maps.

Dynamic Layers for Pushpin Official Release

Posted by I Wei Lai - 08/07/06 08:27:23

Dynamic Layers for Pushpin is what we're calling the new version (0.9) of the API and there's a new documentation page for this version. We just officially released this here at the 2006 ESRI International User Conference but there has been some press already. The highlight of this new release is the ability to toggle map layers and display thematic data, which is shown nicely in a demo on the Pushpin site. Here's a list of some of the new features:
  • New maps generated by NAVTEQ data with 15 detailed zoom levels using the Mercator projection.
  • Separate pre-rendered map layers including base, parks and water, freeways and streets, and cities.
  • Render thematic data such as total population, median income and median age.
  • Control over colors and ranges for thematic shading and a legend display.
  • Library of embeddable widgets that control different functionalities in the API.
  • New classes and functions.
Click here for examples of how to get started with Dynamic Layers.

removeControl() now takes an argument

Posted by I Wei Lai - 08/04/06 11:53:55

Previously, the removeControl() function from PMap assumed that only one control could exist on the map at one time so it wasn't necessary to pass an argument. We're planning to introduce more types of controls, so it now takes an argument which represents the control you want to remove, e.g. PLargeMapControl.

Updates

Posted by I Wei Lai - 07/20/06 11:09:29

This has been a busy month. We've been getting ready to release a new version of the API that was discussed in previous posts. Features include the ability to turn map layers on and off, which means separate, disaggregated map tiles are merged on the fly on the server and then handed to the client. As well, you can render thematic data on the fly (subsequent requests are cached) and merge that with the layers (under the streets and freeways) to see shaded maps, with the option to embed widgets to control specific actions. Will keep you posted...