Using the webBrowser control to show google map directions - winforms

I'm using google maps to show directions inside a web browser control, and suddenly my windows xp users are reporting there is no longer a line following the roads. Also, it draws a shaded shape on the map (showing a territory) and this no longer works. Did google change something? Can I still support this?

Related

How can i automate Google map image on web page?

I am not able to automate google map screen which is present on my application web page.
I have web page where google map is present in square in half of screen. I want to click on the road present in map or a restaurant logo which is present on the google map.
When i tried to find the locators for the map then in the DOM it is present as an image and no other html properties or locators are associated with it.
Also i tried an option using moveToElement() function of action class but this solution is not reliable as most of the time it is not working.
Please suggest me any solution for this automation issue if someone faced this issue of Google maps automation before ?
Sounds like HTML5 issue over a google maps issue. This is tricky for Selenium, see these articles:
https://www.linkedin.com/pulse/html-canvas-testing-selenium-opencv-maciej-kusz/
https://chariotsolutions.com/blog/post/automated-testing-of-html5-canvas/
which recommend using action chains to move to and click certain x,y coordinates.
Also, check out the canvas javascript api; you may be able to use javascript_executor to manipulate the canvas.

Integration of Vimeo's video in WPF

We have an account on Vimeo where we display some videos for specific viewers. They are privates and we customize the ui's player to disable the share's options. The only thing that the viewer can do it's play the video.
Moreover, we defined a only one specific domain where the videos can be integrated. So we have some webpages on this domain where we integrate the videos.
In a webbrowser like Firefox, Chrome or Edge, if we go on a webpage hosted on this domain, there are no issue to display and play it. But if we use the WPF webbrowser, the webpage can be display with the video, but the Vimeo's player show a message that we can read the video because of privacy settings that we defined.
Why in a browser like Firefox or other, I don't have any issue or message to play the video from a webpage on my domain (what we want) and in the WPF webbrowser, the Vimeo's player don't allow me to play the video on the same webpage in my domain ?
Thank's for help.
The WPF WebBrowser control uses the Internet Explorer ActiveX control embedded within its window. So, it has the same limitations as the installed version of Internet Explorer. By default, it will be using IE 7 compatibility so more modern JavaScript may not work quite right.
You can force the control to use a more modern rendering engine either by using a fixed DOCTYPE in the HTML (but obviously, you don't control Vimeo's HTML) or for any launch of your executable on the machine by setting a registry key as described in this Microsoft article: Browser Emulation
You will need to add an entry for your .exe name. For example, if your application is myviewer.exe, it would be something like this to get IE 11 rendering.
HKEY_CURRENT_USER
SOFTWARE
Microsoft
Internet Explorer
Main
FeatureControl
FEATURE_BROWSER_EMULATION
myviewer.exe = (DWORD) 00011000

reCAPTCHA v2 with wpf webbrowser / frame control

reCAPTCHA has limitation on browser supports however it works on IE without adding any value in compatibility mode. I have been trying multiple things with WPF application which is displaying a webpage hosted inside a Frame (or Web Browser) control. That webpage has Google reCAPTCHA V2 (I'm not a robot). It works fine in all the browsers but inside WPF app it fails to display properly.
Based on following link we need to have specific browser support
https://support.google.com/recaptcha#6262736
I also made sure javascripts are enabled and working fine. Any suggestion?
I ran into this issue as well and the only thing I know how to make it work is go into the recaptcha admin console and slide the security preference to the easiest so the webBrowser control can do the image verification at the very least
Update:
Found out basically because the web browser control is IE 7 by default
Use latest version of Internet Explorer in the webbrowser control

Simple integration of Bing Maps into WPF application page

How would I go about integrating Bing Maps into a page or frame in my WPF application? I have found a lot of resources for Bing Maps development, but I don't need to develop with Bing Maps, just add the actual thing into my application without hyper-linking out to the website.
Windows 8 applications do this with "contracts" with other metro apps but I do not see a similar functionality with WPF applications.
Thank you!
Just go here and download the control :)
http://msdn.microsoft.com/en-us/library/hh750210.aspx
The control is in the "Bing Maps WPF Control SDK"
If i remember correctly you will need to register for an api key.
UPDATE:
to get the api key you have to register here https://www.bingmapsportal.com/
This was a lot easier than I expected, #Tjofras had a correct answer but here is some more elaboration:
1) Get a Bing Maps developer key for free here - https://www.bingmapsportal.com/
There is a trial version that gives you all the features, but for a limited time and there is a basic version that is free but has limited features.
2) Create a project in Visual Studio for Desktop
3) Check out this article for step-by-step instructions and the exact lines of code to integrate it into your project.
This line goes at the top of your MainWindow.xaml page :
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
Add the map into your existing grid with your developer key, initial latitude and longitude values, and an initial zoom level with the tags:
m:Map object
CredentialsProvider tag (your developer license code)
Center tag (initial latitude and longtitude)
ZoomLevel tag (how zoomed in you are)
Browse the API's and make your application awesome!

Silverlight simple map tool with zoom and pushpins

I'm very new to Silverlight so bear with me. I need to implement a web page with a zoom-able map of Europe. I need the map to contain pushpins or such like which are generated from a database of lon/lat locations.
If the user hovers over a pin then some data should appear about the location and then if the user clicks on a location and be given detailed information (images, text and other live data) next to the map. Originally I was looking at google maps or bing but as this is to be used commercially and is not going to be public, I am unable to use them for licencing reasons.
I've looked into using deepzoom, which seems perfect but I cannot find any decent ways of adding the pushpins.
So essentially can anyone suggest a tool to allow me to make a zoomable map (I can supply a map image) which can have pushpins generated which can be selected by the user through highlight or click
Many thanks,
Cap
Use Bing Maps Silverlight Control.
Here is preview from Microsoft.
You need Developers Account for using it. Account is free. You can get it here.
Bing Maps control is simple to use, supports pushpins and deep zoom.

Resources