@@ -23,14 +23,15 @@ function createBasemap() {
2323
2424/**
2525 * Create IconMarkerBase that will be used for icon marker.
26+ * @param {string } shadow_icon_path The path to shadow icon.
2627 * @returns {object } IconMarkerBase
2728 * @property Icon
2829 */
29- function createIconMarkerBase ( ) {
30+ function createIconMarkerBase ( shadow_icon_path ) {
3031 var IconMarkerBase ;
3132 IconMarkerBase = L . Icon . extend ( {
3233 options : {
33- shadowUrl : '/static/img/shadow-icon.png' ,
34+ shadowUrl : shadow_icon_path ,
3435 iconSize : [ 19 , 32 ] ,
3536 shadowSize : [ 42 , 35 ] ,
3637 iconAnchor : [ 12 , 32 ] ,
@@ -46,10 +47,11 @@ function createIconMarkerBase() {
4647 * @param {string } user_icon_path The icon path for user role.
4748 * @param {string } trainer_icon_path The icon path for trainer role.
4849 * @param {string } developer_icon_path The icon path for developer role.
50+ * @param {string } shadow_icon_path The shadow for all icons.
4951 * @returns {{user_icon: IconMarkerBase, trainer_icon: IconMarkerBase, developer_icon: IconMarkerBase} }
5052 */
51- function createAllIcons ( user_icon_path , trainer_icon_path , developer_icon_path ) {
52- var IconMarkerBase = createIconMarkerBase ( ) ;
53+ function createAllIcons ( user_icon_path , trainer_icon_path , developer_icon_path , shadow_icon_path ) {
54+ var IconMarkerBase = createIconMarkerBase ( shadow_icon_path ) ;
5355 var user_icon = new IconMarkerBase ( { iconUrl : user_icon_path } ) ;
5456 var trainer_icon = new IconMarkerBase ( { iconUrl : trainer_icon_path } ) ;
5557 var developer_icon = new IconMarkerBase ( { iconUrl : developer_icon_path } ) ;
@@ -246,7 +248,7 @@ function onMapClick(e) {
246248 var user = {
247249 'latitude' : markerLocation . lat . toFixed ( 8 ) ,
248250 'longitude' : markerLocation . lng . toFixed ( 8 )
249- }
251+ } ;
250252 var popup = getUserFormPopup ( user , ADD_USER_MODE ) ;
251253 marker_new_user . bindPopup ( popup ) . openPopup ( )
252254}
0 commit comments