Pushpin API Catalog (Version 1.2)

Pushpin Collections *NEW
API Documentation
API Blog
API Catalog
Map Controls
Map Types
Map Layers
Place Types *NEW
Place Type Configs *NEW
Place Orders *NEW
Marker Set IDs *NEW
Scales and Zoom Level
Indicator IDs
Color Ramps
Icons
Widget IDs
Attribute Types
Filter Types
Contact us


(c) 2008 Placebase, Inc.
The Pushpin 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 default map type. It contains the BASE, POLY, POINTLINE and CITIES map layers.
SATELLITE This is the satellite map type. It contains the SATELLITE map layer.
HYBRID This is the hybrid map type. It contains the SATELLITE map layer and an instance of the TPOINTLINE map layer with a different opacity.
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.
BASEELEV An alternative base map layer which shows elevation and contour details at certain zoom levels.
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 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.
ZIP A map layer that contains USPS Zip Code boundaries at certain zoom levels.
ZIP_LABEL A map layer that contains USPS Zip Code 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.
TRACT A map layer that contains US Census Tract boundaries at certain zoom levels.
TRACT_LABEL A map layer that contains US Census Tract labels at certain zoom levels.
BLOCK A map layer that contains US Census Block Group boundaries at certain zoom levels.
BLOCK_LABEL A map layer that contains US Census Block Group labels at certain zoom levels.

Place Types

The following are predefined place types currently supported by the API. These are objects that can be used with PPlace related functions to differentiate between different types of places or geographies, e.g. state or county. You can get the name of the type with the getName() function, e.g.
PPlaceType.STATE.getName();
PPlaceType Object Description
STATE This specifies the place type for states.
COUNTY This specifies the place type for counties.
CBSA This specifies the place type for CBSA (US Census Core Based Statistical Area).
CITY This specifies the place type for cities (US Census Place).
ZCTA This specifies the place type for ZCTA (US Census ZIP Code Tabulation Area).
ZIP This specifies the place type for zip codes.
CENSUSTRACT This specifies the place type for US Census Tracts.
BLOCKGROUP This specifies the place type for US Census Block Groups.

Place Type Configurations

The PlaceTypeConfig object is used to configure place types with zoomlevels. This can be used when looking up what place type to request per zoom level. Here are some predefined configurations.

PPlaceTypeConfig Object Description
PPLACECONTAINMENT Sets PPlaceType objects STATE, COUNTY, CITY and ZIP at various zoom levels. Useful with PClientGeocoder.getPlaceContainment() to decide which place to query for at different zooms.

Place Orders

The following are ways to order places, e.g. when using PClientGeocoder.getPlace().
geocoder.getPlace(
		"Los Angeles",
		function(places) {
			if (places.length > 0)
				alert(places[0].label + " (" + places[0].getType().getName() + ")");
		},
		20,
		PPlaceOrder.LABEL
);
PPlaceOrder Object Description
AREA Orders places by largest area first.
POPULATION Orders places by the largest population first.
LABEL Orders places alphabetically by the name/label.

Marker Set IDs

Click here to see point datasets currently supported by the API. Value-added market information data can be purchased separately in transaction bundles. Here is an example for creating a predefined server side marker set.
markerSet = new POverlaySet(499);

Scales and Zoom Levels

The following are scales that are available for our map layers. For convenience, unlike previous versions of the API, you do not need to know the scale numbers when building your own map type. For example:
maptype.enableAbsoluteZooms([7,8,9,10,11]);
Scale Absolute Zoom Level (NORMAL Map Type)
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
4500 15

Indicator IDs

Click here to browse through our catalog 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(168002);

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. This is the default icon when using predefined server side marker sets.
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.