ZeroTierOne/root/geoip-html.h

56 lines
1.8 KiB
C
Raw Normal View History

2019-09-06 14:37:44 +00: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 15:11:20 +00:00
" <meta name=\"referrer\" content=\"no-referrer\">\n" \
2019-09-06 14:37:44 +00: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 15:27:03 +00:00
" center: {lat: 0, lng: 0},\n" \
2019-09-06 14:37:44 +00:00
" zoom: 3\n" \
" });\n" \
" var markers = locations.map(function(location,i) {\n" \
2019-09-06 15:27:03 +00:00
" var lbl = location._l||\"\";\n" \
" delete location._l;\n" \
2019-09-06 14:37:44 +00:00
" return new google.maps.Marker({\n" \
" position: location,\n" \
2019-09-06 15:27:03 +00:00
" label: lbl\n" \
2019-09-06 14:37:44 +00:00
" });\n" \
" });\n" \
2019-09-06 15:54:27 +00: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 14:37:44 +00:00
" }\n" \
" var locations = ["
#define ZT_GEOIP_HTML_TAIL \
"];\n" \
" </script>\n" \
" <script src=\"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js\">\n" \
" </script>\n" \
2019-09-06 14:40:32 +00:00
" <script async defer\n" \
2019-09-06 15:18:11 +00:00
" src=\"https://maps.googleapis.com/maps/api/js?key=%s&callback=initMap\">\n" \
2019-09-06 14:40:32 +00:00
" </script>\n" \
2019-09-06 14:37:44 +00:00
" </body>\n" \
"</html>"
#endif