Executer html dans vb.net
khalil.khalil
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
Heliotte Messages postés 1491 Date d'inscription Statut Membre Dernière intervention -
Heliotte Messages postés 1491 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
est il possible d'executet du code html dans une application vb.net .
*****************code html********************
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css?csw=1" rel="stylesheet" type="text/css" />
<title>API Maps v3: Multiple infoWindows and zoom issues</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var sites = [
['Darlington', 36, 10, 1, 'Darlington, where I am living.<br/><a href="https://www.flickr.com/photos/rbochet/5560158585/" title="Figue agressive de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5030/5560158585_c9a6919140_m.jpg" width="240" height="160" alt="Figue agressive" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157625988396879/">Flickr album</a>'],
['Flinders', 36.7, 10.1, 2, 'Flinders, where I study <br/><a href="https://www.flickr.com/photos/rbochet/5560157467/" title="Espace détente sur le campus de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5060/5560157467_c55c85aaf6_m.jpg" width="160" height="240" alt="Espace détente sur le campus" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157626229866287/">Flickr album</a>'],
['Glenelg Beach', 36.76, 10.2, 1, 'Glenelg Beach, no comment.<br/><a href="https://www.flickr.com/photos/rbochet/5543247540/" title="Palmier lampadaire de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5057/5543247540_3f6ac76676_m.jpg" width="160" height="240" alt="Palmier lampadaire" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157626132035286/">Flickr album</a>'],
['Hindley Street', 36.76, 10.21, 1,'Hindley Street, a pub dedicated street.<br/><a href="https://www.flickr.com/photos/rbochet/5457455729/" title="Culture locale de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5052/5457455729_b8ebf274c8_m.jpg" width="240" height="160" alt="Culture locale" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157626085607850/">Flickr album</a>']
];
var infowindow = null;
function initialize() {
var centerMap = new google.maps.LatLng(36, 10);
var myOptions = {
zoom: 1 ,
center: centerMap,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
setZoom(map, sites);
setMarkers(map, sites);
infowindow = new google.maps.InfoWindow({
content: "Loading..."
});
}
/*
This functions sets the markers (array)
*/
function setMarkers(map, markers) {
for (var i = 0; i < markers.length; i++) {
var site = markers[i];
var siteLatLng = new google.maps.LatLng(site[1], site[2]);
var marker = new google.maps.Marker({
position: siteLatLng,
map: map,
title: site[0],
zIndex: site[3],
html: site[4],
// Markers drop on the map
animation: google.maps.Animation.DROP
});
google.maps.event.addListener(marker, "click", function () {
infowindow.setContent(this.html);
infowindow.open(map, this);
});
}
}
/*
Set the zoom to fit comfortably all the markers in the map
*/
function setZoom(map, markers) {
var boundbox = new google.maps.LatLngBounds();
for ( var i = 0; i < markers.length; i++ )
{
boundbox.extend(new google.maps.LatLng(markers[i][1], markers[i][2]));
}
map.setCenter(boundbox.getCenter());
map.fitBounds(boundbox);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
</html>
*****************fin ***********************
en fait jai besoin de charger les coordonnes (lon,lat)d'une base de donnees et les mettre dans la variables sites
merci ;)
est il possible d'executet du code html dans une application vb.net .
*****************code html********************
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css?csw=1" rel="stylesheet" type="text/css" />
<title>API Maps v3: Multiple infoWindows and zoom issues</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var sites = [
['Darlington', 36, 10, 1, 'Darlington, where I am living.<br/><a href="https://www.flickr.com/photos/rbochet/5560158585/" title="Figue agressive de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5030/5560158585_c9a6919140_m.jpg" width="240" height="160" alt="Figue agressive" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157625988396879/">Flickr album</a>'],
['Flinders', 36.7, 10.1, 2, 'Flinders, where I study <br/><a href="https://www.flickr.com/photos/rbochet/5560157467/" title="Espace détente sur le campus de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5060/5560157467_c55c85aaf6_m.jpg" width="160" height="240" alt="Espace détente sur le campus" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157626229866287/">Flickr album</a>'],
['Glenelg Beach', 36.76, 10.2, 1, 'Glenelg Beach, no comment.<br/><a href="https://www.flickr.com/photos/rbochet/5543247540/" title="Palmier lampadaire de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5057/5543247540_3f6ac76676_m.jpg" width="160" height="240" alt="Palmier lampadaire" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157626132035286/">Flickr album</a>'],
['Hindley Street', 36.76, 10.21, 1,'Hindley Street, a pub dedicated street.<br/><a href="https://www.flickr.com/photos/rbochet/5457455729/" title="Culture locale de Romain Bochet, sur Flickr"><img src="https://farm6.static.flickr.com/5052/5457455729_b8ebf274c8_m.jpg" width="240" height="160" alt="Culture locale" /></a><br/>See my <a href="https://www.flickr.com/photos/rbochet/sets/72157626085607850/">Flickr album</a>']
];
var infowindow = null;
function initialize() {
var centerMap = new google.maps.LatLng(36, 10);
var myOptions = {
zoom: 1 ,
center: centerMap,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
setZoom(map, sites);
setMarkers(map, sites);
infowindow = new google.maps.InfoWindow({
content: "Loading..."
});
}
/*
This functions sets the markers (array)
*/
function setMarkers(map, markers) {
for (var i = 0; i < markers.length; i++) {
var site = markers[i];
var siteLatLng = new google.maps.LatLng(site[1], site[2]);
var marker = new google.maps.Marker({
position: siteLatLng,
map: map,
title: site[0],
zIndex: site[3],
html: site[4],
// Markers drop on the map
animation: google.maps.Animation.DROP
});
google.maps.event.addListener(marker, "click", function () {
infowindow.setContent(this.html);
infowindow.open(map, this);
});
}
}
/*
Set the zoom to fit comfortably all the markers in the map
*/
function setZoom(map, markers) {
var boundbox = new google.maps.LatLngBounds();
for ( var i = 0; i < markers.length; i++ )
{
boundbox.extend(new google.maps.LatLng(markers[i][1], markers[i][2]));
}
map.setCenter(boundbox.getCenter());
map.fitBounds(boundbox);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
</html>
*****************fin ***********************
en fait jai besoin de charger les coordonnes (lon,lat)d'une base de donnees et les mettre dans la variables sites
merci ;)
A voir également:
- Executer html dans vb.net
- Editeur html - Télécharger - HTML
- Espace html ✓ - Forum HTML
- Executer .sh ✓ - Forum Shell
- [**] Balise pour un espace vide en hml. Merci ✓ - Forum Webmastering
- /Var/www/html/index.html ✓ - Forum Linux / Unix
2 réponses
Il y a une solution il faut mettre ce code site une page web puis dans ton vb ajouté un webbrowser avec l'url de la page.
SI tu veux je te l'héberge gratuitement sur mon site.
SI tu veux je te l'héberge gratuitement sur mon site.
alexisjps
mais cette technique tout le monde la connais elle est pourrie !! pour rajouter une bannière de pub par exemple cela ne marche pas ...
supersiteweb67
oui c'est vrai, mais c'est la seul solution que je connaisse