Proximitii Book a Demo

Schools Widget Documentation

Show nearby elementary schools, high schools and child care on an interactive map. Read the installation details, parameters and examples.

The Schools Widget shows nearby elementary schools, high schools and child care on an interactive map. Visitors can compare walking times, available school details and test scores where provided.

Schools Widget showing elementary school listings, walking times and schools on a neighborhood map

Installation

Add the container and widget script to your page. Replace the public widget key and coordinates with your own values.

<div id="prox-schools"></div>

<script src="https://widget.proximitii.com/v1/core/proximitii-widget.js?v=73"></script>
<script>
ProximitiiWidgets.schools({
  container: 'prox-schools',
  widgetKey: 'PUT_YOUR_WIDGET_KEY_HERE',
  lat: 40.778832684988224,
  lon: -73.98103168840414
});
</script>

Always provide a valid widgetKey, lat and lon. The remaining settings are optional and use the defaults below. The default radius is 6,400 metres.

Customization

Pass optional settings in the ProximitiiWidgets.schools configuration object. The sandbox's preview width changes its test area; it is not a widget setting.

Location and Content Options:

NameDescriptionDefault ValueAccepted ValuesVariable / Function
ContainerID of the element where the widget renders.N/AValid element IDcontainer
Widget KeyYour public widget key.N/AValid widget keywidgetKey
LatitudeCenter latitude.N/A-90 to 90lat
LongitudeCenter longitude.N/A-180 to 180lon
RadiusSearch radius in metres.6400Integer from 100 to 6,400radius
CountryCountry dataset for the location.usus or cacountry
TitleHeading above the map.Schools & Child CareText, up to 50 characterstitle
Title Font SizeHeading size.30px10px to 50pxtitleFontSize
School CategoriesSelects the visible tabs. Include at least one category.All threeArray containing elem, high and/or childcarecategories
Maximum Schools Per CategoryLimits listings in each selected category.25Integer from 1 to 25maxSchoolsPerCategory
Default SortInitial order of the school list.distancedistance, name, score or assigneddefaultSchoolSort

Score and assigned-school sorting apply to school listings. If you show only child care, use distance or name.


Appearance and Map Options:

NameDescriptionDefault ValueAccepted ValuesVariable / Function
Primary ColorMain brand color, including map markers.#607eb8Hex colorprimaryColor
Show BorderShows or hides the widget border.truetrue or falseshowBorder
Box StyleWidget container styling.shadowshadow or flatboxStyle
Font FamilyWidget font.Poppins, sans-serifCSS font familyfontFamily
Map StyleMap presentation.lightlight, modern, bright or baselinemapStyle
Show School District BoundaryShows the district boundary where available.truetrue or falseshowSchoolDistrictBoundary
Disable Gesture HandlingAllows scrolling to zoom without Ctrl/Command when enabled.falsetrue or falsedisableGestureHandling

Download Report

Set downloadReportMode to control the report button. The default referral mode opens the Local Insights report flow. Use lead for a contact form, or hidden to remove the button.

ModeWhat visitors seeSetting
referral (default)Download Report button opening the Local Insights report flow.downloadReportMode: 'referral'
leadDownload Report button with a contact form.downloadReportMode: 'lead'
hiddenNo Download Report button.downloadReportMode: 'hidden'

For example, add downloadReportMode: 'lead' after lon in the installation call. Add a comma after the lon value first.