localiser les membres

Started by jeanmi62, October 16, 2011, 04:51:42 AM

Previous topic - Next topic

maximus23

Bonjour,

Il y a une erreur je corrige sur les deux forums un moment :)

Edit : Voilà c'est corrigé retester merci :)



Pas de support par PM ou Courrier...Veuillez utiliser le forum pour vous avoir une réponse rapide à votre demande d'aide. Merci.
Amitiés et à Bientôt...
No support by PM or Mail...You will get better and faster responses in the support forums. Thank you.
Have a nice day...

jeanmi62

#21
Bon ca marche .
Il faur aller dans profil de base et avatar .
tout en bas , et la tu peux mettre une epingle en agrandissant la carte , ensuite tu sauvegardes .
tu reviens sur le forum , dans carte des membres tu vas trouver ton nom , tu clic dessus et tu vois ton epingle .
amitiés
theme Smf 2.0 :windows seven
un forum est fait pour partager , remercions ceux qui nous aident

fonfonsd


ll_ll

Bonjour,
Depuis que j'ai installé et activé Google Maps dès qu'on se connecte on a ça :

http://www...fr/index.php?PHPSESSID=18fd363201f76a6b5c93b7be08927c84&action=googlemap;sa=.js

// arrays to hold copies of the markers and html used by the sidebar // because the function closure trick doesnt work there var gmarkers = []; var htmls = []; // This function picks up the click and opens the corresponding info window function myclick(i) { gmarkers[i].openInfoWindowHtml(htmls[i]); } function MakeMap() { // Globals. // Icon(s), and if gender is enabled, php will allow those to be defined. function cancelscroll() { window.event.returnValue = false; window.event.cancelBubble = true; } // Our standard pin var icon = new GIcon() icon.image = "http://chart.apis.google.com/chart?chst=d_map_pin_icon_withshadow&chld=car-dealer|66FF66|202020"; icon.iconSize = new GSize(27,25); icon.iconAnchor = new GPoint(9,25); icon.infoWindowAnchor = new GPoint(9,6.25); // For that clustering thing! var clusterIcon = new GIcon(); clusterIcon.image = "http://chart.apis.google.com/chart?chst=d_map_pin_icon_withshadow&chld=info|FF66FF|202020"; clusterIcon.iconSize = new GSize(27,25); clusterIcon.iconAnchor = new GPoint(9,25); clusterIcon.infoWindowAnchor = new GPoint(9,6.25); // for the ladies and gents var iconm = new GIcon(); iconm.image = "http://chart.apis.google.com/chart?chst=d_map_pin_icon_withshadow&chld=WCmale|0066FF"; iconm.iconSize = new GSize(27,25); iconm.iconAnchor = new GPoint(9,25); iconm.infoWindowAnchor = new GPoint(9,6.25); var iconf = new GIcon(); iconf.image = "http://chart.apis.google.com/chart?chst=d_map_pin_icon_withshadow&chld=WCfemale|FF0099"; iconf.iconSize = new GSize(27,25); iconf.iconAnchor = new GPoint(9,25); iconf.infoWindowAnchor = new GPoint(9,6.25); if (GBrowserIsCompatible()) { // this variable will collect the html which will eventually be placed in the sidebar var sidebar_html = ""; var i = 0; // A function to create the marker and set up the event window function createMarker(point, icon, name, html) { var marker = new GMarker(point, icon); GEvent.addListener(marker, "click", function() { map.getCenter(point); map.panTo(point); marker.openInfoWindowHtml(html); }); // save the info we need to use later for the sidebar gmarkers[i] = marker; htmls[i] = html; name = name.replace(/\[b\](.*)\[\/b\]/gi, "$1"); // add a line to the sidebar html sidebar_html += '' + name + '
'; //Now that we cached it lets return the marker.... i++; return marker; } // create the map var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl3D()); map.addControl(new GMapTypeControl()); map.disableScrollWheelZoom(); map.enableContinuousZoom(); // Lets load up the default long/lat/zoom for the map. map.setCenter(new GLatLng(47, 3.05), 5,G_NORMAL_MAP); // This is so we can try to cluster some of those pins together so the map does not get over loaded. var clusterer = new Clusterer(map); clusterer.icon = clusterIcon; clusterer.minMarkersPerClusterer = 10; clusterer.maxVisibleMarkers = 90; clusterer.GridSize = 10; clusterer.MaxLinesPerInfoBox = 10; // Read the data var request = GXmlHttp.create(); request.open("GET", "http://www.golf5forum.fr/index.php?action=googlemap;sa=.xml", true); request.onreadystatechange = function() { if (request.readyState == 4) { var xmlDoc = request.responseXML; // obtain the array of markers and loop through it var markers = xmlDoc.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { // obtain the attribues of each marker var lat = parseFloat(markers[i].getAttribute("lat")); var lng = parseFloat(markers[i].getAttribute("lng")); var point = new GLatLng(lat,lng); var html = markers[i].childNodes[0].nodeValue; var label = markers[i].getAttribute("label"); // create the marker if (parseFloat(markers[i].getAttribute("gender")) == 0) var marker = createMarker(point, icon, label, html); if (parseFloat(markers[i].getAttribute("gender")) == 1) var marker = createMarker(point, iconm, label, html); if (parseFloat(markers[i].getAttribute("gender")) == 2) var marker = createMarker(point, iconf, label, html); map.addOverlay(marker); } // put the assembled sidebar_html contents into the sidebar div document.getElementById("gooSidebar").innerHTML = sidebar_html; } } request.send(null); } else { alert("Sorry, the Google Maps API is not compatible with this browser"); } } setTimeout('MakeMap()', 500);
Modifié les forums c'est comme le tuning... faut savoir s'arrêter :)

maximus23

Bonjour,

Oui là il faudrait remettre le code correctement dans ta page :)

Pas de support par PM ou Courrier...Veuillez utiliser le forum pour vous avoir une réponse rapide à votre demande d'aide. Merci.
Amitiés et à Bientôt...
No support by PM or Mail...You will get better and faster responses in the support forums. Thank you.
Have a nice day...

ll_ll

#25
Quel code?
Quelle page?

Edit : C'est bon j'ai trouvé le problème :)
Modifié les forums c'est comme le tuning... faut savoir s'arrêter :)

maximus23

Bonsoir,

Fais nous profiter de ta correction pour les autres membres merci :)

Pas de support par PM ou Courrier...Veuillez utiliser le forum pour vous avoir une réponse rapide à votre demande d'aide. Merci.
Amitiés et à Bientôt...
No support by PM or Mail...You will get better and faster responses in the support forums. Thank you.
Have a nice day...

ll_ll

L'erreur venait du faite que j'ai inséré via des codes HTML sur le portail, la carte MAP de Google Maps.
Ca fonctionnait très bien mais à chaque connexion tout le monde avait cette redirection vers cette page d'erreur. (si recliquait sur le lien du forum, tout fonctionnait normalement et surtout sans de génération d'erreur dans le journal)

J'ai pour l'instant désativer le bloc HTML Carte des membres et plus de pb :)
Modifié les forums c'est comme le tuning... faut savoir s'arrêter :)

Advertisement: