<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>5 Apr 2019 14:03:42 Z</lastBuildDate><pubDate>4 Apr 2019 16:07:03 Z</pubDate><description>Bonjour, je cherche depuis une bonne journée déjà comment faire pour récupérer une certaine valeur d'une carte Google Map API.&#13;
&#13;
Je vous explique, j'utilise un champ ActiveX de type Microsoft Web Browser afin de lire un fichier HTML qui contient tout le code HTML et JavaScript qui a pour but d'afficher la carte Google.&#13;
Sur cette carte je dois afficher plusieurs milliers de polygones différents et chaque polygone possède un certain nombre d'informations.&#13;
&#13;
Ce code HTML / JavaScript est généré à chaque fois que l'utilisateur spécifie ce qu'il recherche dans différents champs combo, j'ai donc affecté à chacun de ces polygones un identifiant unique (que l'on peut récupérer lorsque l'on clique sur chaque polygone) puisque je ne peux pas me permettre d'augmenter encore plus la taille du fichier étant donné que lorsque toutes les parcelles sont affichés cela prend déjà près d'une vingtaine de seconde à tout générer.&#13;
&#13;
Je souhaite donc savoir comment faire pour retourner cette valeur à WinDev, me permettant ainsi d'ouvrir une nouvelle carte avec uniquement la parcelle sélectionnée mais cette fois ci avec toutes ses informations.&#13;
&#13;
Voici un morceau du code qui me permet d'afficher ma carte &#13;
&#13;
[code:wl]&#13;
maCarte ="&lt;html&gt;"&#13;
maCarte+="&lt;head&gt;"&#13;
maCarte+="&lt;meta name='viewport' content='initial-scale=1.0, user-scalable=no'&gt;"&#13;
maCarte+="&lt;meta charset='utf-8'&gt;"&#13;
maCarte+="&lt;title&gt;Simple Polygon&lt;/title&gt;"&#13;
maCarte+="&lt;style&gt;"&#13;
maCarte+="#map {"&#13;
maCarte+="height: 680px;"&#13;
maCarte+="}"&#13;
maCarte+="html, body {"&#13;
maCarte+="height: 100%;"&#13;
maCarte+="margin: 0;"&#13;
maCarte+="padding: 0;"&#13;
maCarte+="}"&#13;
maCarte+="&lt;/style&gt;"&#13;
maCarte+="&lt;/head&gt;"&#13;
maCarte+="&lt;body&gt;"&#13;
maCarte+="&lt;div id='map'&gt;&lt;/div&gt;"&#13;
maCarte+="&lt;script&gt;"&#13;
maCarte+="function initMap() {"&#13;
maCarte+="var map = new google.maps.Map(document.getElementById('map'), {"&#13;
maCarte+="zoom: 18,"&#13;
maCarte+="center: {lat: 42.88281383279, lng: 2.898677443496},"&#13;
maCarte+="mapTypeId: 'terrain'"&#13;
maCarte+="});"&#13;
//Variable InfoWindow&#13;
maCarte+="var infowindow = new google.maps.InfoWindow({"&#13;
maCarte+="size: new google.maps.Size(150, 50)"&#13;
maCarte+="});"&#13;
//Suppression des InfoWindow à chaque clique sur la carte &#13;
maCarte+="google.maps.event.addListener(map, 'click', function() {"&#13;
maCarte+="infowindow.close();"&#13;
maCarte+="});"&#13;
//Affichage des polygones&#13;
POUR i = 1 À 4000&#13;
	Q_SelectionCoordEtParcelle.ParamIDParcelle = i&#13;
	HExécuteRequête(Q_SelectionCoordEtParcelle)&#13;
	HLitPremier(Q_SelectionCoordEtParcelle)&#13;
	POUR j = 1 À 4&#13;
		SI Q_SelectionCoordEtParcelle.Latitude &lt;&gt; 0 ALORS&#13;
			SI Q_SelectionCoordEtParcelle.NumeroPolygone = j ALORS&#13;
				maCarte+= "var C" + i + " = ["&#13;
				POUR TOUT Q_SelectionCoordEtParcelle AVEC Q_SelectionCoordEtParcelle.NumeroPolygone = j&#13;
					maCarte+="{lat: " + Q_SelectionCoordEtParcelle.Latitude + ", lng: " + Q_SelectionCoordEtParcelle.Longitude + "}," &#13;
				FIN	&#13;
				maCarte = Gauche(maCarte,Taille(maCarte)-1)&#13;
				maCarte+="];"&#13;
				maCarte+="var P" + i + " = new google.maps.Polygon({"&#13;
				maCarte+="paths: C" + i + ","&#13;
				maCarte+="strokeColor: '#FF0000,"&#13;
				maCarte+="strokeOpacity: 0.8,"&#13;
				maCarte+="strokeWeight: 2,"&#13;
				maCarte+="fillColor: '#FFFF00,"&#13;
				maCarte+="fillOpacity: 0.35"&#13;
				maCarte+="});"&#13;
				//Apparition des infos de la parcelle lorsqu'un clic gauche est effectué dessus&#13;
				maCarte+="google.maps.event.addListener(P"+i+", 'click', function(event) {"&#13;
				maCarte+="var contentString = '"+ IDENTIFIANT_A_RENVOYER +"' ;"&#13;
				maCarte+="infowindow.setContent(contentString);"&#13;
				maCarte+="infowindow.setPosition(event.latLng);"&#13;
				maCarte+="infowindow.open(map);"&#13;
				maCarte+="});"&#13;
				maCarte+="P" + i + ".setMap(map);"&#13;
			FIN&#13;
		SINON&#13;
			SORTIR&#13;
		FIN&#13;
	FIN&#13;
FIN&#13;
maCarte+="}"&#13;
maCarte+="&lt;/script&gt;"&#13;
maCarte+="&lt;script async defer"&#13;
maCarte+=" src='https://maps.googleapis.com/maps/api/js?key=MA_CLE_API&amp;libraries=drawing&amp;callback=initMap'&gt;"&#13;
maCarte+="&lt;/script&gt;"&#13;
maCarte+="&lt;/body&gt;"&#13;
maCarte+="&lt;/html&gt;"&#13;
&#13;
fCrée(fRepEnCours()+"\carte.html")&#13;
nIDFichier est un entier&#13;
&#13;
nIDFichier = fOuvre(fRepEnCours()+"\carte.html",foEcriture)&#13;
SI nIDFichier &lt;&gt; -1 ALORS&#13;
	fEcrit(nIDFichier,maCarte)&#13;
	fFerme(nIDFichier)&#13;
SINON&#13;
	Erreur()&#13;
FIN&#13;
&#13;
AX_carte&gt;&gt;navigate(fRepEnCours()+"\carte.html")&#13;
[/code]&#13;
&#13;
Merci d'avance de vos réponses.&#13;
&#13;
Maxime D</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via/read.awp</link><title>[WD24] Récupération de données d'une carte Google Map API via champ ActiveX</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>Maxime D</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229194/read.awp</comments><pubDate>5 Apr 2019 14:03:42 Z</pubDate><description>Bon étant donné que je ne peux pas me permettre de passer des jours sur ce problème, je me contente tout simplement d'écrire les…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229194/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229194/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via/read.awp">[WD24] Récupération de données d'une carte Google Map API via champ ActiveX</source><title>Re: [WD24] Récupération de données d'une carte Google Map API via champ ActiveX</title></item><item><author>Maxime D</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229187/read.awp</comments><pubDate>5 Apr 2019 11:34:26 Z</pubDate><description>Bon étant donné que je ne peux pas me permettre de passer des jours sur ce problème, je me contente tout simplement d'écrire les…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229187/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229187/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via/read.awp">[WD24] Récupération de données d'une carte Google Map API via champ ActiveX</source><title>Re: [WD24] Récupération de données d'une carte Google Map API via champ ActiveX</title></item><item><author>Philippe SB</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229181/read.awp</comments><pubDate>5 Apr 2019 07:51:57 Z</pubDate><description>@LC: Je n'utilise pas le champ carte car je 'en ai pas l'utilité, mais je dirais qu'à priori oui c'est possible. Regarde cette f…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229181/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-229181/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via/read.awp">[WD24] Récupération de données d'une carte Google Map API via champ ActiveX</source><title>Re: [WD24] Récupération de données d'une carte Google Map API via champ ActiveX</title></item><item><author>LC</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225303/read.awp</comments><pubDate>4 Apr 2019 18:20:33 Z</pubDate><description>Philippe : on peut tracer des polygones et les colorier avec un champ carte ?</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225303/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225303/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via/read.awp">[WD24] Récupération de données d'une carte Google Map API via champ ActiveX</source><title>Re: [WD24] Récupération de données d'une carte Google Map API via champ ActiveX</title></item><item><author>Maxime D</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225302/read.awp</comments><pubDate>4 Apr 2019 18:00:27 Z</pubDate><description>Je ne crois pas que je peux réaliser mon projet avec le champ carte, sur tout les exemples que j'ai trouvé, pour afficher une ca…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225302/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225302/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via/read.awp">[WD24] Récupération de données d'une carte Google Map API via champ ActiveX</source><title>Re: [WD24] Récupération de données d'une carte Google Map API via champ ActiveX</title></item><item><author>Philippe SB</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225295/read.awp</comments><pubDate>4 Apr 2019 16:39:54 Z</pubDate><description>Bonjour,&#13;
&#13;
Si tu utilises Google maps, pourquoi ne pas utiliser le champ carte et la fonction RécupèreObjetJS ?&#13;
&#13;
--&#13;
Cordiale…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225295/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via-225295/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/225291-wd24-recuperation-donnees-carte-google-map-api-via/read.awp">[WD24] Récupération de données d'une carte Google Map API via champ ActiveX</source><title>Re: [WD24] Récupération de données d'une carte Google Map API via champ ActiveX</title></item></channel></rss>
