Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Albert Beltran
map
Commits
0be8effd
Commit
0be8effd
authored
Dec 04, 2018
by
Raph El
Browse files
Modif ajout des marker personaliser des element
parent
ec33ae11
Changes
2
Hide whitespace changes
Inline
Side-by-side
assets/css/map.css
View file @
0be8effd
...
...
@@ -57,11 +57,12 @@
display
:
inline
;
}
.popup-
div-desc
{
.popup-
section
{
margin-top
:
15px
;
font-size
:
12px
;
}
.popup-
desc
{
.popup-
subtitle
{
font-weight
:
400
;
border-bottom
:
1px
solid
lightgray
;
...
...
@@ -73,6 +74,23 @@
}
.btn-more
{
border-color
:
#D2D2D2
!important
;
margin-top
:
5px
;
margin-bottom
:
7px
!important
;
text-align
:
center
;
color
:
#3C3C3C
!important
;
font-weight
:
500
;
border-radius
:
10px
10px
10px
10px
!important
;
width
:
100%
;
}
.popup-info-profil
{
margin-left
:
10px
;
}
/*.item_map_list.popup-marker {
width: 100%;
...
...
assets/js/map.js
View file @
0be8effd
...
...
@@ -92,20 +92,15 @@ var mapObj = {
params
.
opt
=
{}
;
params
.
opt
.
icon
=
myIcon
;
console
.
log
(
"
addMarker myIcon end
"
,
myIcon
);
var
latLon
=
[
params
.
elt
.
geo
.
latitude
,
params
.
elt
.
geo
.
longitude
]
;
var
marker
=
L
.
marker
(
latLon
,
params
.
opt
);
console
.
log
(
"
addMarker marker
"
,
marker
);
mapObj
.
markerList
.
push
(
marker
);
console
.
log
(
"
addMarker mapObj.markerList
"
,
mapObj
.
markerList
);
if
(
typeof
params
.
addPopUp
!=
"
undefined
"
&&
params
.
addPopUp
===
true
)
mapObj
.
addPopUp
(
marker
,
params
.
elt
);
mapObj
.
arrayBounds
.
push
(
latLon
);
console
.
log
(
"
addMarker marker2
"
,
marker
);
if
(
mapObj
.
activeCluster
===
true
)
mapObj
.
markersCluster
.
addLayer
(
marker
);
else
{
...
...
@@ -169,9 +164,12 @@ var mapCustom = {
project
:
modules
.
map
.
assets
+
'
/images/markers/project-marker-default.png
'
,
event
:
modules
.
map
.
assets
+
'
/images/markers/event-marker-default.png
'
,
getMarker
:
function
(
data
){
mylog
.
log
(
"
getMarker
"
,
jQuery
.
inArray
(
data
.
type
,
[
"
project
"
,
"
projects
"
]
)
,
data
);
mylog
.
log
(
"
getMarker
"
,
jQuery
.
inArray
(
data
.
type
,
[
"
project
"
,
"
projects
"
]
)
,
data
.
profilMarkerImageUrl
);
if
(
typeof
data
!=
"
undefined
"
&&
data
==
null
)
return
mapCustom
.
markers
.
default
;
else
if
(
typeof
data
.
profilMarkerImageUrl
!==
"
undefined
"
&&
data
.
profilMarkerImageUrl
!=
""
)
return
baseUrl
+
data
.
profilMarkerImageUrl
;
else
if
(
typeof
data
.
type
!=
"
undefined
"
&&
data
.
type
==
null
)
return
mapCustom
.
markers
.
default
;
else
if
(
jQuery
.
inArray
(
data
.
type
,
[
"
organization
"
,
"
organizations
"
,
"
NGO
"
]
)
!=
-
1
){
...
...
@@ -228,17 +226,16 @@ var mapCustom = {
if
(
typeof
data
.
shortDescription
!=
"
undefined
"
&&
data
.
shortDescription
!=
""
&&
data
.
shortDescription
!=
null
)
{
popup
+=
"
<div class='popup-
div-desc
'>
"
popup
+=
"
<div class='popup-
desc
'>Description</div>
"
popup
+=
"
<div class=''>
"
+
data
.
shortDescription
+
"
</div>
"
popup
+=
"
<div class='popup-
section
'>
"
;
popup
+=
"
<div class='popup-
subtitle
'>Description</div>
"
;
popup
+=
"
<div class=''>
"
+
data
.
shortDescription
+
"
</div>
"
;
popup
+=
"
</div>
"
;
}
if
(
(
typeof
data
.
url
!=
"
undefined
"
&&
data
.
url
!=
null
)
||
(
typeof
data
.
email
!=
"
undefined
"
&&
data
.
email
!=
null
)
){
popup
+=
"
<div id='pop-contacts' class='popup-section'>
"
popup
+=
"
<div class='popup-subtitle'>Contacts</div>
"
popup
+=
"
<div id='pop-contacts' class='popup-section'>
"
;
popup
+=
"
<div class='popup-subtitle'>Contacts</div>
"
;
if
(
typeof
data
.
url
!=
"
undefined
"
&&
data
.
url
!=
null
){
popup
+=
"
<div class='popup-info-profil'>
"
;
...
...
@@ -270,12 +267,12 @@ var mapCustom = {
// onclick = 'urlCtrl.loadByHash("'+url+'");';
// popup += "<a href='"+url+"' onclick='"+onclick+"' class='item_map_list popup-marker lbh' id='popup"+id+"'>";
// }
popup
+=
"
<a href='
"
+
url
+
"
' target='_blank' class='item_map_list popup-marker' id='popup
"
+
id
+
"
'>
"
;
popup
+=
'
<
div
class="
btn btn-sm btn-more col-md-12">
'
;
popup
+=
'
<
i class="fa fa-hand-pointer-o"></i>trad.knowmore
'
;
popup
+=
'
</div>
</a>
'
;
popup
+=
"
<div class='popup-section'>
"
;
popup
+=
"
<a href='
"
+
url
+
"
' target='_blank' class='item_map_list popup-marker' id='popup
"
+
id
+
"
'>
"
;
popup
+=
'
<div class="btn btn-sm btn-more col-md-12">
'
;
popup
+=
'
<
i
class="
fa fa-hand-pointer-o"></i>trad.knowmore
'
;
popup
+=
'
<
/div></a>
'
;
popup
+=
'
</div>
'
;
popup
+=
'
</div>
'
;
return
popup
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment