Added site marker (and settings for that)
Shows radars location on map. Default is not showing. Settings: SiteShow is boolean [true|false] SiteLat & SiteLon in decimal format. If using untrackedDeveloperSettings.js-file these settings can be copy-pasted on that file: SiteShow = false; SiteLat = 45.0; SiteLon = 9.0; modified: public_html/config.js modified: public_html/script.js modified: public_html/style.css
This commit is contained in:
parent
6cb5c2b0ff
commit
8b8f74697c
|
@ -1,17 +1,25 @@
|
|||
// ----------------------------------------------------
|
||||
// --------------------------------------------------------
|
||||
//
|
||||
// This file is to configure the configurable settings.
|
||||
// Load this file before script.js file at gmap.html.
|
||||
//
|
||||
// ----------------------------------------------------
|
||||
// --------------------------------------------------------
|
||||
|
||||
// -- Map settings ----------------------------------------
|
||||
// The Latitude and Longitude in decimal format
|
||||
var CONST_CENTERLAT = 45.0;
|
||||
var CONST_CENTERLON = 9.0;
|
||||
|
||||
CONST_CENTERLAT = 45.0;
|
||||
CONST_CENTERLON = 9.0;
|
||||
// The google maps zoom level, 0 - 16, lower is further out
|
||||
var CONST_ZOOMLVL = 5;
|
||||
CONST_ZOOMLVL = 5;
|
||||
|
||||
// -- Marker settings -------------------------------------
|
||||
// The default marker color
|
||||
var MarkerColor = "rgb(127, 127, 127)";
|
||||
var SelectedColor = "rgb(225, 225, 225)"
|
||||
MarkerColor = "rgb(127, 127, 127)";
|
||||
SelectedColor = "rgb(225, 225, 225)";
|
||||
|
||||
// -- Site Settings ---------------------------------------
|
||||
SiteShow = false; // true or false
|
||||
// The Latitude and Longitude in decimal format
|
||||
SiteLat = 45.0;
|
||||
SiteLon = 9.0;
|
||||
|
||||
|
|
|
@ -145,6 +145,21 @@ function initialize() {
|
|||
|
||||
GoogleMap.mapTypes.set("dark_map", styledMap);
|
||||
|
||||
// Add home marker if requested
|
||||
if (SiteShow) {
|
||||
var siteMarker = new google.maps.LatLng(SiteLat, SiteLon);
|
||||
var markerImage = new google.maps.MarkerImage('http://maps.google.com/mapfiles/kml/pal4/icon57.png',
|
||||
new google.maps.Size(32, 32), // Image size
|
||||
new google.maps.Point(0, 0), // Origin point of image
|
||||
new google.maps.Point(16, 16)); // Position where marker should point
|
||||
var marker = new google.maps.Marker({
|
||||
position: siteMarker,
|
||||
map: GoogleMap,
|
||||
icon: markerImage,
|
||||
title: 'My Radar Site'
|
||||
});
|
||||
}
|
||||
|
||||
// Did our crafty user need some setup?
|
||||
extendedInitalize();
|
||||
|
||||
|
|
|
@ -18,5 +18,5 @@ div#sidebar_container { float: left; width: 410px; margin-left: -410px; height:
|
|||
|
||||
#selectedinfotitle { font-size: larger; }
|
||||
#selectedinfo { font-size: small; }
|
||||
#selectedinfo a { text-decoration: none; color: blue;}
|
||||
#selectedinfo a { text-decoration: none; color: blue; font-size: x-small;}
|
||||
#selectedinfo.dim { opacity: 0.3; filter:alpha(opacity=30); /* For IE8 and earlier */ }
|
||||
|
|
Loading…
Reference in a new issue