2019-09-06 07:37:44 -07:00
# ifndef ZT_ROOT_GEOIP_HTML_H
# define ZT_ROOT_GEOIP_HTML_H
# define ZT_GEOIP_HTML_HEAD \
" <!DOCTYPE html> \n " \
" <html> \n " \
" <head> \n " \
" <meta name= \" viewport \" content= \" initial-scale=1.0, user-scalable=no \" > \n " \
" <meta charset= \" utf-8 \" > \n " \
2019-09-06 08:11:20 -07:00
" <meta name= \" referrer \" content= \" no-referrer \" > \n " \
2019-09-06 07:37:44 -07:00
" <title>GeoIP Map</title> \n " \
" <style> \n " \
" #map { \n " \
" height: 100%; \n " \
" } \n " \
" html, body { \n " \
" height: 100%; \n " \
" width: 100%; \n " \
" margin: 0; \n " \
" padding: 0; \n " \
" } \n " \
" </style> \n " \
" </head> \n " \
" <body> \n " \
" <div id= \" map \" ></div> \n " \
" <script> \n " \
" function initMap() { \n " \
" var map = new google.maps.Map(document.getElementById('map'), { \n " \
2019-09-06 08:27:03 -07:00
" center: {lat: 0, lng: 0}, \n " \
2019-09-06 07:37:44 -07:00
" zoom: 3 \n " \
" }); \n " \
2019-09-06 08:45:39 -07:00
" var markers = locations.map(function(location,i) { \n " \
2019-09-06 08:27:03 -07:00
" var lbl = location._l|| \" \" ; \n " \
" delete location._l; \n " \
2019-09-06 07:37:44 -07:00
" return new google.maps.Marker({ \n " \
" position: location, \n " \
2019-09-06 08:27:03 -07:00
" label: lbl \n " \
2019-09-06 07:37:44 -07:00
" }); \n " \
" }); \n " \
2019-09-06 08:54:27 -07:00
" var markerCluster = new MarkerClusterer(map,markers,{imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m',maxZoom:13,minimumClusterSize:2,zoomOnClick:true}); \n " \
2019-09-06 07:37:44 -07:00
" } \n " \
" var locations = [ "
# define ZT_GEOIP_HTML_TAIL \
" ]; \n " \
" </script> \n " \
2019-09-06 08:45:39 -07:00
" <script src= \" https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js \" > \n " \
" </script> \n " \
2019-09-06 07:40:32 -07:00
" <script async defer \n " \
2019-09-06 08:18:11 -07:00
" src= \" https://maps.googleapis.com/maps/api/js?key=%s&callback=initMap \" > \n " \
2019-09-06 07:40:32 -07:00
" </script> \n " \
2019-09-06 07:37:44 -07:00
" </body> \n " \
" </html> "
# endif