Une image dans le marker me semble impossible. Mais dans l'infobulle oui. Pour le merker tu peux en changer en modifiant l'icone dans la partie admin du plugin.
Ce qui va te donner un truc de ce genre: http://www.entre2morins.fr/spip.php?page=lacarte
Pour les images j'avais fait ainsi..(Attention, j'ai des champs extras!)
Désolé c'est un peu fouillis mais c'est le principe que je te montre ceci est dans info_bulle.html qui se trouve dans le dossier /json/
<style>
.leaflet-popup-content-wrapper {
border: 1px solid #000066;
border-radius: 5px 5px 5px 5px;
font-size:9px;
}
.leaflet-popup-content {
width : 200px;
}
</style>
<BOUCLE_GEO_LON_LAT_USER(spip_gis_liens){objet=auteur}{id_objet=#SESSION{id_auteur}}>
[(#SET{user_geo,#ID_GIS})]
</BOUCLE_GEO_LON_LAT_USER>
<div style="width:190px;">
[<a href="#URL_ARTICLE" style="text-decoration:none; color:#FF6633;" title="<:suite:>">(#INFO_TITRE{article,#ID_ARTICLE})</a><br/>]
<BOUCLE_gis(GIS){id_gis=#ID_GIS}><BOUCLE_gislien(spip_gis_liens){id_gis=#ID_GIS}{objet=article}><div style="float:left;"><a href="#URL_ARTICLE" title="<:suite:>">[(#DESCRIPTIF|extraire_balise{img}|extraire_attribut{src}|image_reduire{110}|image_recadre{80,80,center center})]</a></div></BOUCLE_gislien></BOUCLE_gis>
<BOUCLE_AUTEUR(GIS){id_gis=#ID_GIS}><div style="float:left;width:110px;">
[(#DOMPRIV|=={oui}|?{'<div style="float:left;margin-left:5px;height:auto;"><img src="squelettes/images/prive.png" title="Domaine privé" /></div>',''})]
[(#GREETERS|=={oui}|?{<div style="float:left;margin-left:5px;height:auto;"><a href="#URL_GREETERS" target="_blank"><img src="squelettes/images/greeters.png" title="Greeters" /></a></div>,''})] [(#GUIDEG|=={oui}|?{<div style="float:left;margin-left:5px;height:auto;"><a href="#URL_GUIDE" target="_blank"><img src="squelettes/images/guide_gratuit.png" title="Guide Gratuit" /></a></div>,''})]
[(#NOVISIT|=={non}|?{'<div style="float:left;margin-left:5px;height:auto;"><img src="squelettes/images/x.png" title="On ne visite pas" /></div>','<div style="float:left;margin-left:5px;height:auto;"><img src="squelettes/images/v.png" title="Visitable" /></div>'})]
[(#GUIDEPAY|=={oui}|?{<div style="float:left;margin-left:5px;height:auto;"><a href="#URL_GUIDE" target="_blank"><img src="squelettes/images/p.png" title="Guide ou entrée payante" /></a></div>,''})] </div>
<div style="float:left;margin-top:4px;margin-left:5px;font-size:10px;">Intérêt:[(#INTERET|=={1}|?{'<div style="margin-left:5px;height:auto;"><img src="squelettes/images/1.gif" title="1 étoile" /></div>',''})][(#INTERET|=={2}|?{'<div style="margin-left:5px;height:auto;"><img src="squelettes/images/2.gif" title="2 étoiles" /></div>',''})][(#INTERET|=={3}|?{'<div style="margin-left:5px;height:auto;"><img src="squelettes/images/3.gif" title="3 étoiles" /></div>',''})][(#INTERET|=={4}|?{'<div style="margin-left:5px;height:auto;"><img src="squelettes/images/4.gif" title="4 étoiles" /></div>',''})][(#INTERET|=={5}|?{'<div style="margin-left:5px;height:auto;"><img src="squelettes/images/5.gif" title="5 étoiles" /></div>',''})]</div>
</BOUCLE_AUTEUR>
<p style="position:asolute;width:200px;"> </p><br /><br />
<BOUCLE_GEO(GIS){id_article}>
<BOUCLE_DISTANCE(GIS){id_gis=#GET{user_geo}}{gis distance}>
[<font style="font-size:10px;">Adresse à (#DISTANCE|couper{5}) <sup>km</sup></font><br/>]
</BOUCLE_DISTANCE>
[<div style="float:left"><font style="font-size:10px;">(#ADRESSE|couper{25})</font></div><br />]
[<font style="font-size:10px;">(#VILLE|couper{20})</font>] [<font style="font-size:10px;">((#REGION|couper{25}))</font>]
</BOUCLE_GEO>
</div>
Ensuite dans le dossier /json/ fichier gis_article.html c'est ainsi:
<BOUCLE_art(ARTICLES){gis}{id_article ?}{id_rubrique ?}{id_rubrique!=16}{id_rubrique!=20}{id_secteur ?}{id_mot ?}{id_auteur ?}{recherche ?}{0, #ENV{limit}}{","}>
{"type": "Feature",
"geometry": {"type": "Point", "coordinates": [#LON, #LAT]},
"id":"#ID_GIS",
"properties": {
"title":[(#INCLURE{fond=json/inc_bulle, id_article, id_gis}|json_encode)]
[(#SET{logo_doc,''})] [(#LOGO_GIS|oui)
[(#SET{logo_doc,#LOGO_GIS|image_passe_partout{32,32}|image_recadre{32,32}})]]
[(#LOGO_GIS|non)
[(#CHEMIN_IMAGE{coke/marker_defaut.png}|oui)
[(#SET{logo_doc,#CHEMIN_IMAGE{marker_defaut.png}|image_passe_partout{32,32}|image_recadre{32,32}})]
]]
[(#GET{logo_doc}|oui)
#SET{icon_w,#GET{logo_doc}|extraire_attribut{src}|largeur}
#SET{icon_h,#GET{logo_doc}|extraire_attribut{src}|hauteur}
#SET{icon_anchorPoint,''}
[,"icon": (#GET{logo_doc}|extraire_attribut{src}|url_absolue|json_encode)],
"icon_size": [(#VAL{91}|chr)]#GET{icon_w},#GET{icon_h}[(#VAL{93}|chr)],
"icon_anchor": [(#VAL{91}|chr)][(#GET{icon_w}|div{2})],[(#GET{icon_h})][(#VAL{93}|chr)]]
}}</BOUCLE_art>
Je ne sais si cela pourra t'aider mais j'ai obtenu cette solution ici même il y a un an environ
ADB a écrit :
Bonsoir
Ceci est déjà appelé par un inclure depuis Rubrique:
Distance nautique - ddconcept.fr
Je voudrais donc aussi inclure une image dans le marker. Mais ça ne veut pas.
Merci
ADB
Le 07/07/2014 20:41, Pierre KUHN a écrit :
Bonsoir
Pourquoi ne pas faire un inclure ?
Le 7 juillet 2014 20:25, ADB <a.adupinbe@orange.fr <mailto:a.adupinbe@orange.fr>> a écrit :
Bonjour
Je progresse, mais j'aimerais savoir pourquoi
[(#SET{titre2,<a href=#URL_ARTICLE>#TITRE* [- (#CHAPO)]</a>})]
[(#SET{image,<img
src='#URL_SITE_SPIP/googleimg/#ID_ARTICLE.jpg'>})]
"description":
[(#GET{titre2}|json_encode)][(#GET{image}|image_reduire{100,x}|json_encode)],
ne veut pas fonctionner.
Le reste fonctionne.
Merci
ADB
_______________________________________________
liste spip
spip@rezo.net <mailto:spip@rezo.net> - désabonnement : envoyer un
mail à spip-off@rezo.net <mailto:spip-off@rezo.net>
Infos et archives : http://listes.rezo.net/mailman/listinfo/spip
Discuter chez rezo.net
Documentation de SPIP : http://www.spip.net/
Irc : de l'aide à toute heure : http://spip.net/irc
--
Pierre KUHN
http://www.voisins-spipeurs.net
------------------------------------------------------------------------
_______________________________________________
liste spip
spip@rezo.net - désabonnement : envoyer un mail à spip-off@rezo.net
Infos et archives : http://listes.rezo.net/mailman/listinfo/spip
Discuter chez rezo.net
Documentation de SPIP : http://www.spip.net/
Irc : de l'aide à toute heure : http://spip.net/irc