Mam na formatce wrzuconą mapę virtualearth w ten oto sposób:
private void generujMape()
{
Location loc = new Location();
loc.Latitude = 47.6;
loc.Longitude = -122.33;
webBrowser1.ObjectForScripting = loc;
StringBuilder markUp = new StringBuilder();
markUp.Append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/\">");
markUp.Append("<html>\n");
markUp.Append("<head>\n");
markUp.Append("<title>:)</title>\n");
markUp.Append("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
markUp.Append("<script type=\"text/javascript\" src=\"http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1\"></script>\n");
markUp.Append("<script type=\"text/javascript\">\n");
//Script to create the map and display it
markUp.Append("var map = null;\n");
markUp.Append("pinid=0; function GetMap(){latLong=null; map = new VEMap('myMap'); if(window.external != null){latLong = new VELatLong(window.external.Latitude,window.external.Longitude);} map.LoadMap(latLong); }\n");
//Script to Add Pushpins
markUp.Append("function AddPushpin(lat,lon)\n{map.SetCenter(new VELatLong(lat,lon));\n\tvar shape = new VEShape(VEShapeType.Pushpin, new VELatLong(lat,lon));\n\tshape.SetTitle('test');\n\tshape.SetDescription('This is shape number '+ pinid);\n\tpinid++;\n\tmap.AddShape(shape);\n}");
//Script To Resize map
markUp.Append("function ResizeMap(w,h)\n{\n\tmap.Resize(w, h);\n\tmyMap.style.width = w + \"px\";\n\tmyMap.style.height = h + \"px\";\n}");
markUp.Append("</script>\n");
markUp.Append("<body onload=\"GetMap();\">");
markUp.AppendFormat("<div id='myMap' style=\"position:relative; width:{0}px; height:{1}px;\"></div>\n", webBrowser1.Width, webBrowser1.Height);
markUp.Append("</body>\n");
markUp.Append("</html>\n");
webBrowser1.DocumentText = markUp.ToString();
}
na tej mapie mam "wrzucone" 3 pictureboxy i chciałbym aby co ileś sekund zmieniała się pozycja tych pictureboxów.
Za nim to zrobię, chciałbym aby położenie tych 3 pictureboxów było tylko w pewnych miejscach: np. warszawa - jeśli to jest jakieś skomplikowane to kij, niech cały świat będzie brany pod uwagę (wygeneruje więcej pictureboxów).