Embed neighborhood score badges anywhere on your real estate website — on a listing detail page, a property card, or even a static HTML email. No map required.
Pick an integration pattern and try it live below.
Add data-mpl-widget to any container and the Mapalizer bundle initialises it automatically at DOMContentLoaded. No additional code is required in your page.
The widget on the right was rendered via the HTML embed. It uses data-show-top="4" together with data-exclude-categories="HEALTH,CULTURE" to keep Health and Culture out of this curated highlights example.
A valid data-token is required for the live preview to render scores.
data-* attributesFor SPA route changes or CMS-injected content, call mapalizer.initWidgets(containerEl) after injecting new HTML to initialise any new [data-mpl-widget] elements.
Provide a siteToken and a coordinate. The widget renders into any container element — no map instance needed.
const result = await mapalizer.renderWidget(
document.getElementById('my-widget'),
{ lat: 52.52, lng: 13.405 },
{
auth: { siteToken: 'mpl_pk_live_...' },
language: 'en',
theme: 'light',
}
);
if (result.ok) {
console.log('scores:', result.scores);
} else {
console.error('error:', result.error);
}
Use showTopCategories to display only the top N categories sorted by score. Pair it with excludeCategories when you want a curated highlights panel that skips lessly used categories such as Health and Culture.
showTopCategories to skip lessly used categories like Health and Culture.const result = await mapalizer.renderWidget(
document.getElementById('my-widget'),
{ lat: 48.8566, lng: 2.3522 },
{
auth: { siteToken: 'mpl_pk_live_...' },
showTopCategories: 4,
excludeCategories: ['HEALTH', 'CULTURE'],
title: 'Location Highlights',
}
);
// Only the 4 highest-scoring non-excluded categories are shown
Pass a categories array to show only specific categories. Useful when your listing page already highlights certain features (e.g. commute + parks for a family-oriented listing).
TRANSIT,ESSENTIALS,HEALTH).const result = await mapalizer.renderWidget(
document.getElementById('my-widget'),
{ lat: 51.5074, lng: -0.1278 },
{
auth: { siteToken: 'mpl_pk_live_...' },
categories: ['TRANSIT', 'ESSENTIALS', 'HEALTH', 'NATURE'],
}
);
// Only the specified categories are scored and displayed