Merged feature custom-markers into develop

master
Keith Irwin 2017-07-20 09:15:07 -04:00
commit 94e00e12d5
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
12 changed files with 20 additions and 3 deletions

View File

@ -32,7 +32,8 @@ const userSchema = new mongoose.Schema({
showSpeed: {type:Boolean, default:false},
showTemp: {type:Boolean, default:false},
showAlt: {type:Boolean, default:false},
showStreetview: {type:Boolean, default:false}
showStreetview: {type:Boolean, default:false},
marker: {type:String, default:'red'}
},
last: {
time: Date,

View File

@ -140,7 +140,8 @@ router.route('/')
showScale: (req.body.showScale)?true:false,
showSpeed: (req.body.showSpeed)?true:false,
showAlt: (req.body.showAlt)?true:false,
showStreetview: (req.body.showStreet)?true:false
showStreetview: (req.body.showStreet)?true:false,
marker: req.body.marker
};
// Save user and send response

BIN
static/img/marker/black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

BIN
static/img/marker/green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

BIN
static/img/marker/grey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

BIN
static/img/marker/red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

BIN
static/img/marker/white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -71,6 +71,7 @@ loadGoogleMapsAPI({ key:mapKey })
marker = new googlemaps.Marker({
position: { lat:mapuser.last.lat, lng:mapuser.last.lon },
title: mapuser.name,
icon: (mapuser.settings.marker)?'/static/img/marker/'+mapuser.settings.marker+'.png':'/static/img/marker/red.png',
map: map,
draggable: false
});

View File

@ -60,6 +60,20 @@
<p id='slug-help' class='red help'></p>
</div>
<div id='marker' class='form-group' title="The color of the marker that shows your location">
<label for="marker">Marker color</label>
<select name="marker">
<option {% if user.settings.marker=='red' or user.settings.marker=='' %}selected {% endif %}value="red">red</option>
<option {% if user.settings.marker=='black' %}selected {% endif %}value="black">black</option>
<option {% if user.settings.marker=='green' %}selected {% endif %}value="green">green</option>
<option {% if user.settings.marker=='grey' %}selected {% endif %}value="grey">grey</option>
<option {% if user.settings.marker=='orange' %}selected {% endif %}value="orange">orange</option>
<option {% if user.settings.marker=='purple' %}selected {% endif %}value="purple">purple</option>
<option {% if user.settings.marker=='white' %}selected {% endif %}value="white">white</option>
<option {% if user.settings.marker=='yellow' %}selected {% endif %}value="yellow">yellow</option>
</select>
</div>
<div id='units' class='form-group' title="Select standard units for feet and miles/hour. Select metric units if you are a commie. ">
<label for="units">Units</label>
<div class='radio-group'>
@ -89,7 +103,7 @@
</div>
<div id='defaultZoom' class='form-group' title="Shows the initial map zoom level on your page. A higher number means more zoom. Note that the size of the viewing window will also have an effect on how much of the map a visitor can see. ">
<label for="map">Default zoom</label>
<label for="zoom">Default zoom</label>
<select name="zoom">
<option {% if user.settings.defaultZoom==1 %}selected {% endif %}value="1">1 World</option>
<option {% if user.settings.defaultZoom==2 %}selected {% endif %}value="2">2</option>