Pushpin™ LE API Catalog (Version 1.0)

API Documentation
API Blog
API Catalog
Map Controls
Map Types
Map Layers
Scales and Zoom Level
Indicator IDs
Color Ramps
Icons
Widget IDs
Attribute Types *NEW
Filter Types *NEW
Contact us


(c) 2008 Placebase, Inc.
The Pushpin LE API Catalog provides a list of available ids or predefined objects that can be used with the API. Predefined objects are accessed through their class, whereas ids are global variables. The following sections list what is currently supported by the API.

Map Controls

The following are map controls currently supported by the API. These are added by using PMap.addControl(control). For example:
map.addControl(new PLargeMapControl());
Class Description
PLargeMapControl Large zoom and pan controls, including the zoom slider. Appears on the top left corner of the map
PSmallMapControl Small zoom and pan controls. Appears on the top left corner of the map
PSmallZoomControl Small zoom controls. Appears on the top left corner of the map
PMapTypeControl Controls for toggling between the normal map (PMapType.NORMAL) and satellite (PMapType.SATELLITE). Appears on the top right corner of the map.

Map Types

The following are predefined map types currently supported by the API. These are objects that can be accessed via PMapType class. These are set by using PMap.setMapType(maptype). For example:
map.setMapType(PMapType.SATELLITE);
PMapType Object Description
NORMAL This is the map type when dynamic layers are used. It contains BASE, POLY, POINTLINE and CITIES. All layers are turned on by default.
SATELLITE This is the satellite map type with dynamic layers. It contains SATELLITE, POLY, TPOINTLINE and CITIES. All layers are turned on by default.
DEFAULT This is the default map type which is set to PMapType.NORMAL. This is set when a new instance of PMap is created and can be set to a different PMapType beforehand, e.g. PMapType.DEFAULT = PMapType.SATELLITE.

Map Layers

The following are predefined map layers currently supported by the API. These are objects that can be accessed via the PMapLayer class and provide easy access to the layers in the map type. Custom layers can be created with Rendermap and the layer object made accessible. For example, to access a layer and turn it off, you can use:
PMapLayer.POINTLINE.off();
PMapLayer Object Description
BASE The default base map layer which includes urban areas, and coastline.
POLY The default polygon map layer which includes parks and water.
POINTLINE The default pointline map layer which includes freeways and streets.
CITIES The default map layer that contains city labels at certain zoom levels.
SATELLITE The satellite layer.
TPOINTLINE A pointline map layer with thinner streets at certain zoom levels. Used with the PMapType.SATELLITE maptype and when indicators are turned on.
COUNTY A map layer that contains county boundaries at certain zoom levels.
COUNTY_LABEL A map layer that contains county labels at certain zoom levels.
ZCTA A map layer that contains ZCTA (Zip Code Tabulation Areas) boundaries at certain zoom levels.
ZCTA_LABEL A map layer that contains ZCTA (Zip Code Tabulation Areas) labels at certain zoom levels.

Scales and Zoom Levels

The following are scales that are available for our map layers. An array of scales can be defined for map types (in descending order). The first scale in the array is zoom level 0. For example:
maptype.setScales([1152000, 576000, 288000, 144000, 72000]);
Scale Default Zoom Level
147456000 0
73728000 1
36864000 2
18432000 3
9216000 4
4608000 5
2304000 6
1152000 7
576000 8
288000 9
144000 10
72000 11
36000 12
18000 13
9000 14

Indicator IDs

The following is a list of IDs of indicators or thematic variables currently supported by the API. Value-added market information data can be purchased separately in transaction bundles. Here is an example for adding an indicator to the map.
map.setIndicatorById(5);
ID Name Description Unit Source Year
1 Total Population Total Population Number US Department of Census 2000
3 Median Income Median Income $ US Department of Census 2000
5 Median Age Median Age Years US Department of Census 2000
21 Median Cash Rent Median Cash Rent $ US Department of Census 2000

Color Ramps

The following are predefined color ramps that work well with our maps. This can be set by the PLegend object. For example:
map.getLegend().setColorRamp(PColorRamp.RED);
PColorRamp Object Colors Description
GREEN
 
 
 
 
 
 
 
 
This is a green color ramp.
BROWN
 
 
 
 
 
 
 
 
This is a brown color ramp.
RED
 
 
 
 
 
 
 
 
This is a red color ramp.
REDPURPLE
 
 
 
 
 
 
 
 
This is a red to purple color ramp.
DEFAULT
 
 
 
 
 
 
 
 
This is the default color ramp which is set to GREEN. This is set when a new instance of PMap is created and can be set to a different PColorRamp beforehand, e.g. PColorRamp.DEFAULT = PColorRamp.BROWN.

Icons

The following are predefined icons that work well with our maps. For example:
var smallIcon = new PIcon(PIcon.SMALL);
PIcon Object Image Description
NORMAL This is the standard Pushpin icon for markers.
SMALL This is a smaller version of the standard icon.
POINT This is an icon that can be used when displaying lots of points.
LOGO This is the image from the Pushpin logo
CLUSTER This is the default icon used for a cluster of markers when using PMarkerManager.
CLUSTER_SMALL This an icon representing a cluster of markers using the SMALL icon.
CLUSTER_POINT This an icon representing a cluster of markers using the POINT icon.
DEFAULT This is the default icon used by when a PMarker is created, which is set to NORMAL. This can be set to a different icon before adding markers.

Widget IDs

The following are widget IDs currently supported by the API. These are enums that can be used to create predefined Pushpin widgets. For example:
var widget = new PWidget(map, document.getElementById("widget"), P_WIDGET_LAYER_ID);
ID Description
P_WIDGET_LAYER_ID This creates the map layers widget which allows you to toggle layers from the current map type on and off. The map type and map layer labels will be displayed (you can set or change this by using setLabel()).
P_WIDGET_INDICATOR_ID This creates the thematic widget for choosing indicators. This displays the legend for the chosen indicator. PMap.setIndicatorList(indicators) needs to be called before adding the widget to populate the indicators used by the widget.
P_WIDGET_OVERLAY_ID This creates the overlays widget which allows you to toggle overlay sets on and off.

Attribute Types

The following are attribute types currently supported by the API. These are enums that can be used to create PAttribute objects. For example:
var attribute = new PAttribute("Number of Bedrooms", 2, PAttribute.NUMBER);
Attribute Type Description
NUMBER This represents a number type (includes integers and floats), e.g. 2, 5.1.
STRING This represents a string type, e.g. "Hello".
BOOLEAN This represents a boolean type (true or false).
DATE This represents a date type, e.g. new Date().setFullYear(2005,2,20). Click here for more information on the Javascript Date Object.

Filter Types

The following are filter types currently supported by the API. These are enums that can be used to create PAttributeFilter objects. For example:
var filter = new PAttributeFilter("Number of Bedrooms", [0,3], PAttributeFilter.RANGE);
Filter Type Description
EQUAL This filters all results that are equal to the value(s) in the array.
RANGE For attributes of type PAttribute.NUMBER or PAttribute.DATE, this filters all results that are between the first and second values in the array. For attributes of type PAttribute.STRING, this filters all results that match the string pattern(s) in the array.