Bonjour
Je rencontre actuellement un problème d'affichage, sur les infobox qui s'affichent sur la google map de mon site.
Au lieu d'afficher les informations clients, un code apparaît
Cordialement
Bonjour
Je rencontre actuellement un problème d'affichage, sur les infobox qui s'affichent sur la google map de mon site.
Au lieu d'afficher les informations clients, un code apparaît
Cordialement
Bonjour,
il faudrait que tu nous montres le code de comment tu injectes le HTML dans ton infoWindow.
Les joies du CSS | Réponses sur forum | Simple comme JS | Essais libres autour de l'API G$$gle Maps
✂ ---------------------------------------------
developpez.net c'est aussi :
✔ Les meilleurs cours et tutoriels pour apprendre le CSS
✔ Les meilleurs cours et tutoriels pour apprendre le (X)HTML
✔ Les meilleurs cours et tutoriels pour apprendre le JavaScript
Bonjour
Voici la fonction qui permet de générer cette info-box
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73 if ( ! empty( $markers ) ) { $home_map_show_price = classifieds_get_option( 'home_map_show_price' ); foreach ( $markers as $marker ) { $ad_gmap_longitude = $marker->longitude; $ad_gmap_latitude = $marker->latitude; $permalink = get_permalink( $marker->ID ); $title = $marker->post_title; if ( strlen( $title > 37 ) ) { $title = substr( $title, 0, 37 ) . '...'; } if ( ! empty( $ad_gmap_longitude ) && ! empty( $ad_gmap_latitude ) ) { $icon = ''; $icon = classifieds_get_cat_icon( $marker->ID ); $phone_number = get_post_meta( $marker->ID, 'ad_phone', true ); if ( empty( $phone_number ) ) { $phone_number = get_user_meta( $marker->post_author, 'phone_number', true ); } $markers_html .= '<div class="marker" data-longitude="' . esc_attr( $ad_gmap_longitude ) . '" data-latitude="' . esc_attr( $ad_gmap_latitude ) . '" data-marker-icon="' . esc_attr( $icon ) . '">'; $info_price = ''; if ( $home_map_show_price == 'yes' ) { ob_start(); classifieds_get_price( $marker->ID ); $info_price = ' <div class="info-price"> <div class="price-block"> <div class="ad-pricing"> ' . ob_get_contents() . ' </div> </div> </div> '; ob_end_clean(); } $markers_html .= htmlspecialchars( ' <div class="info-window clearfix"> ' . $info_price . ' <div class="info-image"> <a href="' . esc_url( $permalink ) . '" target="_blank"> ' . get_the_post_thumbnail( $marker->ID, 'classifieds-map' ) . ' </a> </div> <div class="info-details"> <a href="' . esc_url( $permalink ) . '" target="_blank">' . $title . '</a> ' . ( ! empty( $phone_number ) ? '<p><i class="fa fa-phone"></i> ' . classifieds_format_phones( $phone_number ) . '</p>' : '' ) . ' </div> </div>' ); $markers_html .= '</div>'; } } } else { $has_rows = false; } if ( ! empty( $home_map_ads ) && ( $counter * $limit ) >= $home_map_ads ) { $has_rows = false; } $counter ++; } $markers_html .= '</div>'; if ( $check_cache ) { $home_map_cache_interval = classifieds_get_option( 'home_map_cache_interval' ); set_transient( 'classifieds_home_markers', $markers_html, 60 * 60 * $home_map_cache_interval ); } echo $markers_html; } }
Cordialement
Problème résolu
J'ai trouvé d'ou venait l'erreur, c’était une erreur d’écriture dans mon fichier custom.js avec les signes < et > qui n'étaient pas écrit comme ceci < et >
Cordialement
Romain
Partager