Answer the question
In order to leave comments, you need to log in
How to get rid of page loading error in WebBrowser C#?
Created a WPF project and added a browser to the form with a link to the corresponding html file with the following content.
<!DOCTYPE html>
<html>
<head>
<title>API карт 2ГИС</title>
<script src="http://maps.api.2gis.ru/2.0/loader.js?pkg=full"></script>
<script type="text/javascript">
var map;
DG.then(function () {
map = DG.map('map', {
center: [54.98, 82.89],
zoom: 13
});
DG.marker([54.98, 82.89]).addTo(map).bindPopup('Вы кликнули по мне!');
});
</script>
</head>
<body>
<div id="map" style="width:500px; height:400px"></div>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
tyk - section "examples"
p.s. with IE (webbrowser uses IE as "core") - I've always had a lot of problems... on different computers (at the client) there could be different versions of IE. And something worked, something didn’t (for example, VK swears at a low version of IE). And I decided to install a "built-in" third party browser: awesomium . It has fewer problems than IE... it will work for all clients... regardless of OS (well, I mean from Win7 and above) the only thing is that it's not very convenient to use javascript through it (kind of let's say... ). And so I am very satisfied and use ONLY it ( awesomium ).
upd
js in awesomium:
tyk
tyk
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question