Every EZ Map account comes with API access for you to access your maps in your own projects.
All API requests are rate limited. The limits are approximately 60 calls per minute, after which users will receive a 429 "Too many requests" error and will be unable to make more requests for a minute.
The following headers are sent to assist users
X-RateLimit-Limit
- the number of calls allowed in a minute (currently 60)
X-RateLimit-Remaining
- the number of calls remaining in this minute, reduces with each call.
Retry-After
- when locked out this is the number of seconds until the timer is reset. Subsequent calls within this time will all result in 429 errors.
Please contact us using the feedback tool to request an increase in limits.
All API endpoints begin with the same URL and require your EZ Map registered email address as well as your API key which can be found on your dashboard.
All endpoints require a HTTP POST request.
https://ezmap.co/api/{email}/{apikey}
https://ezmap.co/api/{email}/{apikey}/getmaps
JSON encoded array of map objects
[{ "id": 1, "user_id": 1, "title": "My House", "apiKey": "AIxaSyBK0YfdfIUMRQ9xgz6A62WPfrVJuNMtMy8", "mapContainer": "ez-map", "width": 560, "height": 420, "responsiveMap": true, "latitude": 56.4778058625534, "longitude": -2.86748333610688, "markers": [{ "title": "My House", "icon": "https:\/\/ezmap.co\/icons\/svgs\/location-blue.svg", "lat": 56.4778058625534, "lng": -2.86748333610688, "infoWindow": {"content": "…truncated HTML markup…"} }], "mapOptions": { "mapTypeControlStyle": "0", "mapTypeId": "roadmap", "zoomLevel": "11", "showStreetViewControl": "true", "showZoomControl": "true", "showScaleControl": "true", "draggable": "true", "doubleClickZoom": "true", "clickableIcons": "false", "showFullScreenControl": "false", "keyboardShortcuts": "false", "showMapTypeControl": "false", "scrollWheel": "false" }, "theme_id": 395, "created_at": "2016-05-10 12:59:00", "updated_at": "2016-11-17 16:55:50", "embeddable": true, "deleted_at": null }, { … }]
https://ezmap.co/api/{email}/{apikey}/getmapcode/{mapID}
Raw HTML Markup. This will be similar to the code you would normally paste from the grey box
<!-- Google map code from EZ Map - https://ezmap.co --> <script src='https://maps.googleapis.com/maps/api/js?key='></script> <script> function init() { var mapOptions = { "center": { "lat": 56.4778058625534, "lng": -2.86748333610688 }, "clickableIcons": true, "disableDoubleClickZoom": false, "draggable": true, "fullscreenControl": true, "keyboardShortcuts": true, "mapTypeControl": true, "mapTypeControlOptions": { "text": "Default (depends on viewport size etc.)", "style": 0 }, "mapTypeId": "roadmap", "rotateControl": true, "scaleControl": true, "scrollwheel": true, "streetViewControl": true, "styles": false, "zoom": 3, "zoomControl": true}; var mapElement = document.getElementById('ez-map'); var map = new google.maps.Map(mapElement, mapOptions); window.addEventListener("resize", function() { var center = map.getCenter(); google.maps.event.trigger(map, "resize"); map.setCenter(center); }); } window.addEventListener('load', init); </script> <style> #ez-map{min-height:150px;min-width:150px;height: 420px;width: 100%;} #ez-map .infoTitle{} #ez-map .infoWebsite{} #ez-map .infoEmail{} #ez-map .infoTelephone{} #ez-map .infoDescription{} </style> <div id='ez-map'></div> <!-- End of EZ Map code - https://ezmap.co -->