Embedding SchoolMap
Add the interactive, address-searchable school boundary map to any page on your district website in a few copy-paste steps.
Before you start
Set each school’s location in SchoolBuilder so its pin appears in the right place. To offer assigned-school lookup, confirm that your district’s approved attendance boundaries are in place. Preview an address with a known assignment before sharing the map. A nearby campus or a pin alone does not establish which school serves an address.
Step 1 — Get your embed code
- Sign in at https://app.districtmapper.com.
- In the left sidebar, click Publish & share (or click Preview & share on the SchoolMap page, or go directly to https://app.districtmapper.com/embeds).
- Find the SchoolMap section and click it to expand, then open Add to your website.
- Choose either Script (recommended) or Iframe (simple) — see Embedding overview for help deciding.
- Click Copy script code or Copy iframe code.
Your snippet will look similar to this (the exact code on the Publish & share page is pre-configured for your district):
<div data-districtmapper="finder" data-district="your-district-slug"></div>
<script async src="https://app.districtmapper.com/embed.js"></script>
Tip: Always copy from the Publish & share page — your actual district slug is filled in automatically and the snippet stays in sync with your settings.
Step 2 — Paste into your website
The steps vary by CMS, but the general pattern is:
- Open the page or block where you want the map to appear.
- Switch to HTML / code view (not the visual editor).
- Paste the copied snippet.
- Save and publish the page.
Common CMS locations:
- WordPress — use a Custom HTML block in the Gutenberg editor, or paste into a Text widget.
- Finalsite / SchoolDude / Edlio — look for an “Embed code” or “HTML” widget in the page builder.
- Google Sites — use the Embed option and select “By code.”
- Squarespace / Wix — use the Embed or Code Block element.
Note: Some CMSes strip
<script>tags for security. If the script embed does not appear, use the Iframe version instead.
Step 3 — Test the embed
- Visit the published page as a family would (you can open an incognito window).
- Type a home address into the search box — the map should zoom to that address and highlight the attendance zone.
- Click a school pin to confirm the school detail card opens correctly.
Adjust the height
The map does not resize to fit its content. It has a fixed height in both formats, 600px unless you change it.
- Script embed: add a
data-heightattribute to the<div>, for example<div data-districtmapper="finder" data-district="your-district-slug" data-height="800"></div>. A plain number is read as pixels; you can also usepx,vh,rem, oremvalues such asdata-height="80vh". Percentages are not supported. - Iframe embed: find the
height="600"attribute and increase it to fit your page layout (for example,height="800").
With the school list under the map
Unless you turned off Show the school list below the map (it is on by default) in Map settings, the map keeps the height above, less a strip at the bottom where the list’s heading shows, and the list follows it:
- Script embed: the embed grows to fit the map and the list, so families scroll your page to reach the list. Long lists scroll inside their own box so the map stays close above them. You don’t need to change your snippet. The list is as wide as the embed, so it lines up with the map on any screen. Make the container narrower if you want a narrower map and list.
- Iframe embed: the frame keeps its height, so families scroll inside the frame to reach the list. Use the script embed instead, or raise the iframe’s
height(for example,height="1200") to show more of the list. - Short iframe: to drop the list from one iframe, add
?list=0to the end of the frame’ssrcaddress, for examplesrc="https://app.districtmapper.com/districts/your-district-slug/?list=0". That frame shows the map alone. Your map setting and every other embed keep the list.
A taller map shows more of each school’s pop-up. With the list on, a school’s pop-up is as tall as the map and scrolls inside it. At the standard 600px, families see the school’s contact details and the Website, Enroll and Directions buttons, with a More below label that moves down to the rest. If your schools have featured tabs, a tour button or reviews, we recommend a height between 700 and 800, for example data-height="760", so more of that shows as soon as the pop-up opens.
Landing below your site’s header. When a family picks a school far down the list, the script embed scrolls your page back up to the map. If your site has a header that stays pinned to the top of the window, the embed measures it and stops the map just below it. If the map still lands under your header (some headers hide and come back as the page scrolls), tell the embed how tall the header is with data-scroll-offset, in pixels:
<div data-districtmapper="finder" data-district="your-district-slug" data-scroll-offset="96"></div>
The embed only scrolls your page after a family picks a school from the list, never when the page loads. Iframe embeds cannot do this; the page stays where the family left it.
Related articles
- Troubleshooting embeds — firewall issues, geolocation permission, sizing
- Placing Schools & Locations (the Locator) — make sure your schools appear on the map
- SchoolMap settings — configure what the map shows