Add your own points of interest to the map with rich information, distance calculations, and interactive features.
π¨ Custom SVG Icons
Unique visual markers for different location types
π Real-time Distance
Calculated from user's current location
π Interactive Actions
Click to call, navigate, or open URLs
π¬ Rich Tooltips
Detailed information on hover/click
Basic Implementation
<iframe
src="https://captureland.org/embed/map?showCustomMarkers=true&customMarkers=https://example.com/markers.json"
width="100%"
height="400"
frameborder="0"
allowfullscreen>
</iframe>
JSON Format
{
"markers": [
{
"id": "restaurant-1",
"name": "Jamaican Delights Restaurant",
"phone": "+1 (876) 555-0123",
"address": "123 Montego Bay Drive, Montego Bay, Jamaica",
"description": "Authentic Jamaican cuisine featuring jerk chicken and ackee and saltfish.",
"coordinates": [18.4712, -77.9188],
"hours": "Mon-Sat 11 AM - 10 PM, Sun 12 PM - 9 PM",
"callbackAction": "call",
"color": "#e74c3c",
"size": "medium",
"icon": "<svg width='32' height='32' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z' fill='#e74c3c' stroke='white' stroke-width='1'/><circle cx='12' cy='9' r='2.5' fill='white'/></svg>"
}
]
}
Field Descriptions
Field | Type | Required | Description |
---|---|---|---|
id | string | Yes | Unique identifier for the marker |
name | string | Yes | Display name of the location |
phone | string | No | Phone number for contact |
address | string | Yes | Full address of the location |
description | string | No | Detailed description |
coordinates | [number, number] | Yes | [latitude, longitude] |
hours | string | No | Operating hours (human-readable) |
callbackUrl | string | No | URL to open when clicked |
callbackAction | string | No | Action to perform ("call", "navigate") |
color | string | No | Marker color (hex code) |
size | string | No | Marker size ("small", "medium", "large") |
icon | string | No | Custom SVG icon |
URL Parameters
showCustomMarkers=true // Enable custom markers
customMarkers=URL_OR_JSON // JSON data or URL
showMarkerDistances=true // Show distance from user location
Example Use Cases
π¨ Hotel Booking
Show nearby hotels with booking links
callbackUrl: "https://booking.com/hotel-123"
π½οΈ Restaurant Directory
Display restaurants with menus and reservations
callbackAction: "call"
π₯ Healthcare Services
Show hospitals, clinics, and pharmacies
hours: "24/7 Emergency Care"
π¦ Business Directory
List local businesses with contact info
callbackAction: "navigate"
Complete Example
<!DOCTYPE html>
<html>
<head>
<title>Custom Markers Example</title>
</head>
<body>
<div id="map-container">
<iframe
src="https://captureland.org/embed/map?showCustomMarkers=true&customMarkers=https://example.com/markers.json&showMarkerDistances=true"
width="100%"
height="400"
frameborder="0"
allowfullscreen>
</iframe>
</div>
<script>
window.addEventListener('message', (event) => {
if (event.origin !== 'https://captureland.org') return;
const { type, data } = event.data;
if (type === 'custom_marker_click') {
console.log('Custom marker clicked:', data.markerData.name);
// Handle custom marker interaction
}
});
</script>
</body>
</html>
π‘ Tips & Best Practices
- Coordinate Format: Use [latitude, longitude] format consistently
- Validation: Ensure coordinates are valid (lat: -90 to 90, lng: -180 to 180)
- Performance: Limit to 50-100 markers for optimal performance
- Icons: Use inline SVG for reliability, avoid external URLs
- Colors: Choose colors that contrast well with the map
- Actions: Use appropriate callback actions for better UX