Paramètre Description Gis 2/3

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

Bonsoir

Pourquoi ne pas faire un inclure ?

Bonsoir
Ceci est déjà appelé par un inclure depuis Rubrique:
Je voudrais donc aussi inclure une image dans le marker. Mais ça ne veut pas. Merci ADB

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;">&nbsp;&nbsp;&nbsp;&nbsp;</p><br /><br />

    <BOUCLE_GEO(GIS){id_article}>

        <BOUCLE_DISTANCE(GIS){id_gis=#GET{user_geo}}{gis distance}>
            [<font style="font-size:10px;">Adresse&nbsp;&agrave;&nbsp;(#DISTANCE|couper{5})&nbsp;<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

Salut à tous
Bon, je crois que je vais renoncer, pour l'instant, à cette histoire d'image, parce que j'ai un autre pb sur les bras.
J'ai écrit une boucle à la noix qui affiche une icône différente selon un mot clé après exclusion d'un seul des mot-clé.
Concrètement, j'affiche un,e icône pouir les mots-clés 1, 2, 3, 34 et 35 après avoir exclu le mot-clé 7.
Mais certains articles de mot-clé 2 sont liés à un article de mot-clé 7. Et ma boucle plante.
La voici (je passe les détails de la génération de carte):

<BOUCLE_art1(ARTICLES){id_article ?}{branche ?}{id_secteur ?}{id_mot !=7}{0, #ENV{limit}}{par titre}{","}>
     <BOUCLE_art_port(ARTICLES){id_article}{id_mot==^(2|35)$}>
[(#SET{logo_doc,#CHEMIN{json/port.png}})]"icon":[(#GET{logo_doc}|json_encode)]
     </BOUCLE_art_port>
     <BOUCLE_art_moui(ARTICLES){id_article}{id_mot= 3}>
[(#SET{logo_doc,#CHEMIN{json/mouillage.png}})]"icon":[(#GET{logo_doc}|json_encode)]
     </BOUCLE_art_moui>
     <BOUCLE_art_site(ARTICLES){id_article}{id_mot= 1}>
[(#SET{logo_doc,#CHEMIN{json/site.png}})]"icon":[(#GET{logo_doc}|json_encode)]
     </BOUCLE_art_site>
     <BOUCLE_art_chan(ARTICLES){id_article}{id_mot= 34}>
[(#SET{logo_doc,#CHEMIN{json/chantier.png}})]"icon":[(#GET{logo_doc}|json_encode)]
     </BOUCLE_art_chan>
     <BOUCLE_art_tour(ARTICLES){id_article}{id_mot= 7>
[(#SET{logo_doc,#CHEMIN{json/tourisme.png}})]"icon":[(#GET{logo_doc}|json_encode)]
     </BOUCLE_art_tour>
</BOUCLE_art1>

Et donc l'article de mot-clé 2 lié à un autre article de mot-clé 7 est appelé 2 foius, et plante l'affichage de la carte.
Sans parler du fait que la boucle ne me semble pas très jolie.
Je voudrais au moins - au pire - qu'aucun article de mot-clé 7 ne s'affiche.

Merci de votre aide
ADB

Le 07/07/2014 22:56, Bernard Blazin a écrit :

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;">&nbsp;&nbsp;&nbsp;&nbsp;</p><br /><br />

   <BOUCLE_GEO(GIS){id_article}>

       <BOUCLE_DISTANCE(GIS){id_gis=#GET{user_geo}}{gis distance}>
           [<font style="font-size:10px;">Adresse&nbsp;&agrave;&nbsp;(#DISTANCE|couper{5})&nbsp;<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

Change le fil de discussion, sinon on ne s'y retrouvera pas !

Le 08/07/2014 21:37, ADB a écrit :

Salut à tous
Bon, je crois que je vais renoncer, pour l'instant, à cette histoire d'image, parce que j'ai un autre pb sur les bras.
J'ai écrit une boucle à la noix qui affiche une icône différente selon un mot clé après exclusion d'un seul des mot-clé.
Concrètement, j'affiche un,e icône pouir les mots-clés 1, 2, 3, 34 et 35 après avoir exclu le mot-clé 7.
Mais certains articles de mot-clé 2 sont liés à un article de mot-clé 7. Et ma boucle plante.
La voici (je passe les détails de la génération de carte):

<BOUCLE_art1(ARTICLES){id_article ?}{branche ?}{id_secteur ?}{id_mot !=7}{0, #ENV{limit}}{par titre}{","}>
<BOUCLE_art_port(ARTICLES){id_article}{id_mot==^(2|35)$}>
[(#SET{logo_doc,#CHEMIN{json/port.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_port>
    <BOUCLE_art_moui(ARTICLES){id_article}{id_mot= 3}>
[(#SET{logo_doc,#CHEMIN{json/mouillage.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_moui>
    <BOUCLE_art_site(ARTICLES){id_article}{id_mot= 1}>
[(#SET{logo_doc,#CHEMIN{json/site.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_site>
    <BOUCLE_art_chan(ARTICLES){id_article}{id_mot= 34}>
[(#SET{logo_doc,#CHEMIN{json/chantier.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_chan>
    <BOUCLE_art_tour(ARTICLES){id_article}{id_mot= 7>
[(#SET{logo_doc,#CHEMIN{json/tourisme.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_tour>
</BOUCLE_art1>

Et donc l'article de mot-clé 2 lié à un autre article de mot-clé 7 est appelé 2 foius, et plante l'affichage de la carte.
Sans parler du fait que la boucle ne me semble pas très jolie.
Je voudrais au moins - au pire - qu'aucun article de mot-clé 7 ne s'affiche.

Merci de votre aide
ADB

Le 07/07/2014 22:56, Bernard Blazin a écrit :

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;">&nbsp;&nbsp;&nbsp;&nbsp;</p><br /><br />

   <BOUCLE_GEO(GIS){id_article}>

       <BOUCLE_DISTANCE(GIS){id_gis=#GET{user_geo}}{gis distance}>
           [<font style="font-size:10px;">Adresse&nbsp;&agrave;&nbsp;(#DISTANCE|couper{5})&nbsp;<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

_______________________________________________
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

Désolé!
ADB

Le 08/07/2014 23:17, Sylvain a écrit :

Change le fil de discussion, sinon on ne s'y retrouvera pas !

Le 08/07/2014 21:37, ADB a écrit :

Salut à tous
Bon, je crois que je vais renoncer, pour l'instant, à cette histoire d'image, parce que j'ai un autre pb sur les bras.
J'ai écrit une boucle à la noix qui affiche une icône différente selon un mot clé après exclusion d'un seul des mot-clé.
Concrètement, j'affiche un,e icône pouir les mots-clés 1, 2, 3, 34 et 35 après avoir exclu le mot-clé 7.
Mais certains articles de mot-clé 2 sont liés à un article de mot-clé 7. Et ma boucle plante.
La voici (je passe les détails de la génération de carte):

<BOUCLE_art1(ARTICLES){id_article ?}{branche ?}{id_secteur ?}{id_mot !=7}{0, #ENV{limit}}{par titre}{","}>
<BOUCLE_art_port(ARTICLES){id_article}{id_mot==^(2|35)$}>
[(#SET{logo_doc,#CHEMIN{json/port.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_port>
    <BOUCLE_art_moui(ARTICLES){id_article}{id_mot= 3}>
[(#SET{logo_doc,#CHEMIN{json/mouillage.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_moui>
    <BOUCLE_art_site(ARTICLES){id_article}{id_mot= 1}>
[(#SET{logo_doc,#CHEMIN{json/site.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_site>
    <BOUCLE_art_chan(ARTICLES){id_article}{id_mot= 34}>
[(#SET{logo_doc,#CHEMIN{json/chantier.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_chan>
    <BOUCLE_art_tour(ARTICLES){id_article}{id_mot= 7>
[(#SET{logo_doc,#CHEMIN{json/tourisme.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_tour>
</BOUCLE_art1>

Et donc l'article de mot-clé 2 lié à un autre article de mot-clé 7 est appelé 2 foius, et plante l'affichage de la carte.
Sans parler du fait que la boucle ne me semble pas très jolie.
Je voudrais au moins - au pire - qu'aucun article de mot-clé 7 ne s'affiche.

Merci de votre aide
ADB

Le 07/07/2014 22:56, Bernard Blazin a écrit :

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;">&nbsp;&nbsp;&nbsp;&nbsp;</p><br /><br />

   <BOUCLE_GEO(GIS){id_article}>

       <BOUCLE_DISTANCE(GIS){id_gis=#GET{user_geo}}{gis distance}>
           [<font style="font-size:10px;">Adresse&nbsp;&agrave;&nbsp;(#DISTANCE|couper{5})&nbsp;<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

_______________________________________________
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

_______________________________________________
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

Bonsoir à tous
Bon, je pense avoir résolu mon pb.
Je ne comprends pas tout, mais l'important est que ça fonctionne.
En revanche, je pense que l'écriture pourrait s'améliorer, mais je n'ose plus toucher à rien.
Merci à tous
ADB

Le 08/07/2014 23:24, ADB a écrit :

Désolé!
ADB

Le 08/07/2014 23:17, Sylvain a écrit :

Change le fil de discussion, sinon on ne s'y retrouvera pas !

Le 08/07/2014 21:37, ADB a écrit :

Salut à tous
Bon, je crois que je vais renoncer, pour l'instant, à cette histoire d'image, parce que j'ai un autre pb sur les bras.
J'ai écrit une boucle à la noix qui affiche une icône différente selon un mot clé après exclusion d'un seul des mot-clé.
Concrètement, j'affiche un,e icône pouir les mots-clés 1, 2, 3, 34 et 35 après avoir exclu le mot-clé 7.
Mais certains articles de mot-clé 2 sont liés à un article de mot-clé 7. Et ma boucle plante.
La voici (je passe les détails de la génération de carte):

<BOUCLE_art1(ARTICLES){id_article ?}{branche ?}{id_secteur ?}{id_mot !=7}{0, #ENV{limit}}{par titre}{","}>
<BOUCLE_art_port(ARTICLES){id_article}{id_mot==^(2|35)$}>
[(#SET{logo_doc,#CHEMIN{json/port.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_port>
    <BOUCLE_art_moui(ARTICLES){id_article}{id_mot= 3}>
[(#SET{logo_doc,#CHEMIN{json/mouillage.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_moui>
    <BOUCLE_art_site(ARTICLES){id_article}{id_mot= 1}>
[(#SET{logo_doc,#CHEMIN{json/site.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_site>
    <BOUCLE_art_chan(ARTICLES){id_article}{id_mot= 34}>
[(#SET{logo_doc,#CHEMIN{json/chantier.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_chan>
    <BOUCLE_art_tour(ARTICLES){id_article}{id_mot= 7>
[(#SET{logo_doc,#CHEMIN{json/tourisme.png}})]"icon":[(#GET{logo_doc}|json_encode)]

    </BOUCLE_art_tour>
</BOUCLE_art1>

Et donc l'article de mot-clé 2 lié à un autre article de mot-clé 7 est appelé 2 foius, et plante l'affichage de la carte.
Sans parler du fait que la boucle ne me semble pas très jolie.
Je voudrais au moins - au pire - qu'aucun article de mot-clé 7 ne s'affiche.

Merci de votre aide
ADB

Le 07/07/2014 22:56, Bernard Blazin a écrit :

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;">&nbsp;&nbsp;&nbsp;&nbsp;</p><br /><br />

   <BOUCLE_GEO(GIS){id_article}>

       <BOUCLE_DISTANCE(GIS){id_gis=#GET{user_geo}}{gis distance}>
           [<font style="font-size:10px;">Adresse&nbsp;&agrave;&nbsp;(#DISTANCE|couper{5})&nbsp;<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

_______________________________________________
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

_______________________________________________
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

_______________________________________________
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