Desktop Mapping?

Is it possible to include a map (google or other) within a desktop application and mark multiple addresses within that map? I have a field service application that I would like to show to a dispatcher where each mechanic is location at any given time.

I was thinking about this the other day too for an app I have in mind. I am curious.

I use the google api via httpsocket and retrieve an image that I display in a canvas.

Tim, I’d be interested in how to do this.

Put this code in a pushbutton:

  dim google as new HTTPSocket
  dim address as string = "1705 S Capital Of Texas Highway, Austin, TX 78746"
  address = replaceall(address, ",", "")
  address = replaceall(address, " ", "+")
  dim s as string ="http://maps.googleapis.com/maps/api/staticmap?center="+address _
  +"&markers=color:red%7Clabel:X%7C"+ address _
  + "&size=300x300&sensor=false"
  dim result as string = google.get(s, 15)
  dim f as FolderItem = specialfolder.Temporary.child("tempic")
  if f<> nil then
    if f.exists then f.delete
    dim b as binarystream = BinaryStream.Create(f)
    b.write result
    b.close
    pic = f.OpenAsPicture
    canvas1.Refresh
  end

Where pic is a property of the window and canvas1.Paint is:

if pic <> nil then g.drawpicture pic, 0, 0

The api documentation is at https://developers.google.com/maps/documentation/staticmaps/

2014r1 will have an example that shows how to display a location in a Google Map using HTMLViewer in a desktop app. In the meantime, you can take a look at the Eddie’s Electronics desktop app (in the Sample Applications folder), which also does this. It only shows a single location, but I suspect that multiple locations can be marked as well with some tweaks to the JavaScript.

Thanks, Paul. However, I am unable to use anything past 2013R2 because of ODBCPlugin issues with MS SQL Server databases. So, I’m stuck at that point in time.

You can use Google Maps but you have to pay them if your app is not Open Source. (FREE might get by with no costs but I cant remember as it was a few months ago). HERE Map ( dev link ) and check out the licensing & terms page ( L&T ). HERE allows for commerical use of their APIs for FREE if the API polls are bellow a certain threshold. They have lots of options to get the data also. Javascript API, REST API, and some native APIs.

I have to admit/confess/whatever, my day job is at HERE. I am not part of the MAPping group but I do support them.

sb

as long as you can do REST API calls, you can use the HERE MAPs (and I believe the Google MAPs).

I would expect the example to work fine with older versions. In fact, the EEDesktop example from 2013r2 already has this Google Maps display.