INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

(OP)
I previously used Craig Boyd's excellent class/vcx from Southwest Fox. It was version 6.x
Now to convert this I am hoping someone can give skeletal flow chart so I can make progress. Currently the html file runs Bing Maps when opened in Firefox. However, the html/Javascript won't run from the Ole form Navigate without saying scripting error.
I am aware many are choosing Google Maps over Bing Maps. Would like to use Bing if possible. I run this small company with VFP. Still running Mappoint and routing everything using VFP form with pushpins.
Just stuck. Thanks for any suggestion that ends with.. Yes I can do it with VFP form. clown

One Code to rule them all, One code to bind them.

RE: vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

Quote:

I previously used Craig Boyd's excellent class/vcx from Southwest Fox.

Could you tell us which class you are referring to. Craig Boyd has published very many classes over the years, many of which could be described as excellent and many of which were presented at SW Fox. A link to the class in question would help us figure out which one you need help with.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

(OP)
Apologies for not using the correct references. (even though my career has been with VFP, I'm no expert)
Craig's VirtualEarth demo at SW fox used one html file like;
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol....">
Then below that having functions .. calling GetMap or LoadMap.
The new Bing uses
src="https://www.bing.com/api/maps/mapcontrol?&call..." async defer
then inside the GetMap
map = new Microsoft.Maps.Map(document.getElementById('myMap'),Credentials,options...)

THE Navigate method points to the html file and when it runs on Win7 it errors out on the src="https://www.bing.com/api/maps/mapcontrol?&call..." line. WinXP virtual machine will fly past it without an error, however no map appears in the OLe control.
If I open the html file thru Firefox... the map instantly appears.
So, maybe I should try to do this differently?

Just figured I'd ask before heading down the wrong path. Thanks

One Code to rule them all, One code to bind them.

RE: vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

You don't have a bing problem; you have a problem opening an HTML file within the Web browser Control. When loading HTML via file link Javascript content is blocked.
Besides that your HTML works, it just needs your own MS account bing credentials.

Bye, Olaf.

RE: vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

(OP)
Olaf, your help on this site has been an inspiration for many years.
I have the credentials. I removed them when I posted it. (as I mentioned the File opens and the map appears when ran inside browser)
If the javascript is blocked, we always have found a work around in the past to be able to perform any task via VFP. I will certainly do the research if pointed in the right direction.
I would like to run the Bing code.. show the map, create pushpins, etc. Just like I do now with mappoint directly from my VFP form. Routing, Arranging everything without my users having to exit VFP. It's awesome... just now we need to use Bing since maps are old.
As posted by Mike Gagnon on Foxite, Google Maps easily opens from a form. If I need to use Google Maps...I will.
Just hoped someone would know a way to use Bing. Since all my code works for Mappoint and converting that would be sweet.
Thanks

One Code to rule them all, One code to bind them.

RE: vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

I haven't been at SWFox, I don't have the session, but I'm sure it's all in there, including the json.js.

You normally put web on the web, you always have restrictions, when using files to open. Setup a localhost at least and you'll get around the JS blocking. Always has been that way, and that is generally so, not specifically with bing. I really meant you don't have a bing problem, when I said so.

To demo:

CODE

<html><script>alert('Hello, World');</script></html> 

Save that as html, you might add a better html skeleton, etc., doesn't matter. If you double click on the HTML file or use a webbrowser control and navigate to that file.

If that's not your problem, you should perhaps tell what error you get in Windows 7, because I don't get an error in Windows 10, other than the blocking JS I can override or simply set the browser to accept JS from local content, too.

Aside of the missing json.js, I don't get an error, so I can't help you otherwise than pointing out you may just need to dig deeper into the session material of Craig.

Bye, Olaf.

RE: vfp form stuck - Virtualearth to Bing Maps form stalls on Navigate

(OP)
Ok, I have no errors for scripting and a map.
Mike Gagnon on Foxite, was able to remind me that I needed to put my json, html etc in the project and compile the EXE. Running it thru an EXE bypasses the errors.
So now I can begin the code updating and hopefully be good.
Thank You for your assistance.

One Code to rule them all, One code to bind them.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close