Pushpin API Catalog (Version 1.3)

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) 2009 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 Zoom controls, including the zoom slider. Appears on the top left corner of the map
PSmallMapControl Zoom controls. Appears on the top left corner of the map
PMapTypeControl Controls for toggling between the normal map (PMapType.NORMAL), satellite (PMapType.SATELLITE) and hybrid mode (PMapType.HYBRID). 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, POLY_LABEL, POINTLINE_LABEL, LABEL, NEIGHBORHOOD 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, an instance of the TMINORROADS and TPOINTLINE map layers with a different opacity, POINTLINE_LABEL, TLABEL and CITIES.
NORMAL_TG This is map type contains the same style and layers as NORMAL except it uses US Census TIGER data. It contains the BASE_TG, POLY_TG, POINTLINE_TG, POLY_LABEL_TG, POINTLINE_LABEL_TG, LABEL_TG, NEIGHBORHOOD_TG and CITIES_TG map layers.
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.

The following are older map types that have been renamed:

PMapType Object Description
NORMAL_1 This is the default map type used in earlier versions prior to 1.3. It contains the BASE_1, POLY_1, POINTLINE_1 and CITIES_1 map layers.
HYBRID_1 This is the default hybrid map type used in earlier versions prior to 1.3. It contains the SATELLITE map layer and an instance of the TPOINTLINE_1 map layer with a different opacity.

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 base map layer which includes urban areas, and coastline, federal lands and Native American reservations.
BASEELEV An alternative base map layer which shows elevation and contour details at certain zoom levels.
POLY The polygon map layer which includes parks, water, landuse areas and landmarks.
POLY_LABEL The polygon labels map layer which includes parks, water, landuse areas and landmarks.
POINTLINE The pointline map layer which includes freeways and streets.
POINTLINE_LABEL The pointline labels map layer which includes freeways and streets.
LABEL The map layer that contains labels at certain zoom levels.
NEIGHBORHOOD The map layer that contains neighborhood labels at certain zoom levels.
CITIES The map layer that contains city, state and country 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.
TLABEL A map layer with labels for use with TPOINTLINE at certain zoom levels. Used when indicators are turned on.
TMINORROADS A map layer that shows thinner minor roads at certain zoom levels, to go with TPOINTLINE
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.
PARCEL A map layer that contains parcels at certain zoom levels. Limited coverage with over 55 million parcels nationwide.

The following are older map layers that have been renamed:

PMapLayer Object Description
BASE_1 The base map layer used in earlier versions prior to 1.3, which includes urban areas, and coastline.
POLY_1 The polygon map layer used in earlier versions prior to 1.3, which includes parks and water.
POINTLINE_1 The pointline map layer used in earlier versions prior to 1.3, which includes freeways and streets.
CITIES_1 The map layer used in earlier versions prior to 1.3, that contains city labels at certain zoom levels.
TPOINTLINE_1 A pointline map layer used in earlier versions prior to 1.3, with thinner streets at certain zoom levels. Used when indicators are turned on.

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 US 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 US zip codes.
CENSUSTRACT This specifies the place type for US Census Tracts.
BLOCKGROUP This specifies the place type for US Census Block Groups.
SCHOOL This specifies the place type for US School Districts.
CONGRESSIONAL This specifies the place type for US Congressional Districts.

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
PLEGEND Sets PPlaceType objects STATE, COUNTY, ZIP, ZCTA, CENSUSTRACT, BLOCKGROUP at various zoom levels. Used with PLegend.getCurrentPlaceType() to determine what place type to shade indicators by.
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.

Dataset Types

The following are dataset types currently supported by the API. These are enums that can be used as parameters to various API functions, e.g.
var type = PDatasetType.POINT;
Dataset Type Description
POINT Each row in a point dataset contains an address or a lat/lon pair, and some information pertaining to the point.
INDICATOR Each row in an indicator dataset contains a boundary identifier, and values that apply to that boundary.
POLYGONS Each row in a polygon dataset contains a polygon, and values that apply to that polygon.

Field Types

The following are field types currently supported by the API. These are enums that can be used to define the purpose of a field, as opposed to the datatype it contains, e.g.
var fn = PDatasetFieldFunction.LAT;
Field Type Description
TITLE The field contains a text to be used for titling a data element.
DESCRIPTION The field contains text that describes a data element.
SHAPE The field contains a shape.
ITEMDATE The field contains a date.
INDICATOR The field contains an indicator data value.
LAT The field contains a latitude.
LNG The field contains a longitude.
LATLNG The field contains a latitude-longitude pair identifier.
STREET The field contains the street portion of an address.
CITY The field contains the city name portion of an address.
STATE The field contains the state or province name portion of an address.
ZIP The field contains the zip or postal code portion of an address.
BOUNDARY The field contains a boundary identifier (e.g. a FIPS code, census tract ID, zip code, etc.)
BOUNDARY_TYPE The field contains a boundary-type identifier.
BOUNDARY_DEFINITION The field contains a boundary-definition identifier.
PRIMARY_KEY The field contains a primary key.
TIME_SERIES The field contains time-series information.

Measurement Types

The following are measurement types currently supported by the API. These are enums that can be used to describe the presentation of a field, as opposed to the datatype it contains, e.g.
var t = PMeasurementType.COUNT;
Measurement Type Description
COUNT The field contains a value to displayed as a count of something.
PCT The field contains a value to displayed as a percentage.
PCT_CHG The field contains a value to displayed as a percentage change.
MEDIAN The field contains a value to displayed as a median value.
ENUM The field contains one of a list of enumerated values.
CHG The field contains a value to displayed as a change variable.
RATE The field contains a value to displayed as a rate.
CURRENCY The field contains a value to displayed as currency.
AVG_CURRENCY The field contains a value to displayed as an average currency amount.
TOT_CURRENCY The field contains a value to displayed as a total currency amount.