1. Marc James
  2. PowerBuilder
  3. Tuesday, 21 January 2020 21:10 PM UTC

Hello, I am looking at creating a mobile application to track multiple lorry GPS coordinates with the aim to display these coordinates of each lorry ontop of a map on a desktop application.

What are the best methods, and are there any tutorials/videos available to get me started?

Do I use embed google maps in the desktop app or do I use another provider?

I know I can rely on the eon_mobile_geolocationx class to retrieve the current position. 

I also realise there is eon_mobile_mapex API to do annotations on mobile, but wonder if this can be done on web too.

Thanks

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 06:36 AM UTC
  2. PowerBuilder
  3. # 1
Comment
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Thursday, 23 January 2020 13:07 PM UTC
  2. PowerBuilder
  3. # 2

Hi Marc,

eon_mobile_geolocationex only works for PS Mobile apps. Here you can find a Community tutorial explaining the howtos:

https://community.appeon.com/index.php/articles-blogs/tutorials-articles/9-powerserver-mobile

For Web apps, you must embed (Google) Maps into a Web Browser control. PS Web does not support yet the new Chromium browser, for the time being you must rely on the legacy MS Web Browser (or a 3rd party COM/ActiveX).

Best,

.m

Comment
  1. Marc James
  2. Thursday, 23 January 2020 14:08 PM UTC
Yes, i think we'll use the lorry drivers mobile phone devices to collect GPS location, and send them orders for delivery aggregate etc. We will then just make a PHP website connected to our SAP Sybase 16 database which will have been updated with the lorry coordinates. We can then just use Leaflet to produce the geolocations
  1. Helpful
There are no comments made yet.
Marc James Accepted Answer Pending Moderation
  1. Thursday, 23 January 2020 12:32 PM UTC
  2. PowerBuilder
  3. # 3

We are now looking at Leaflet - Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 38 KB of JS, it has all the mapping features most developers ever need. Use it through the Chromium-based WebBrowser control in PB2019 R2

Comment
  1. Michael Kramer
  2. Thursday, 23 January 2020 13:35 PM UTC
You may need to reconsider Web Browser control since the new control in 2019 R2 doesn't allow access to Document/DOM and no function to execute JavaScript directly from the PB container app. You would need server app and do all comms PB => map via server roundtrips. - or - choose another web browser control. We discussed web browser controls during a presentation on ELEVATE 2019. The most common solution was MS WebBrowser control. It won on available API + "embedability" + low cost (free).
  1. Helpful
  1. Michael Kramer
  2. Thursday, 23 January 2020 13:37 PM UTC
Well, or make some "pipeline" API where PB app writes/reads a local file that the web app also has read/write access to. Bottom line: No built-in API if needed.
  1. Helpful
  1. Marc James
  2. Thursday, 23 January 2020 15:31 PM UTC
Thanks - going to have to get hands dirty I think :) no problem
  1. Helpful
There are no comments made yet.
Marc James Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 22:42 PM UTC
  2. PowerBuilder
  3. # 4

Thanks Michael, will also look at embedding to PB via MS Web Browser Control and finding suitable Map Tile Provider in UK.

Comment
  1. Michael Kramer
  2. Tuesday, 21 January 2020 23:38 PM UTC
Unfortunately new Chromium browser control lacks - 1) access to Document (and hence the DOM as I see it) - and - 2) Function similar to ExecuteJS(string jsCodeBlock) so PB app can an already running single-page-app.

I don't know exact timing of Microsoft's replacing WebView (v1 based on IE) with WebView2 based on CEF. Last time I looked, WebView2 was still in beta and beta release notes said "expect breaking changes."

  1. Helpful
  1. Michael Kramer
  2. Tuesday, 21 January 2020 23:39 PM UTC
Hi Mark, this is the Map Tile Provider we used in Germany. Quick and kind response.

https://www.thunderforest.com/contact/
  1. Helpful
  1. Marc James
  2. Wednesday, 22 January 2020 14:31 PM UTC
https://developers.google.com/maps/documentation/javascript/customoverlays



Looks like with the aid of google JavaScript API you can do overlays, wondering if it's worth exploring this avenue now
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 22:21 PM UTC
  2. PowerBuilder
  3. # 5

I embedded OpenStreetMap via Leaflet.js in 20+ years old large MDI-app in Germany 1½ years ago. Great experience.

Embedded into PB app via MS Web Browser Control because we needed bi-directional data and control flow PB app <=> Web Map App.

Map Tile Providers cost money. So check costs. In Germany we chose OSM over Google due to 1) OSM had railway system overlays with excellent metadata that we really needed. - and - 2) Map Tile Provider was "low price" in comparison.

You can build your own map tile provider servers for OSM - but then you need to run additional servers and replicate changes into your local OSM database. That cost was way much higher than paying a reasonable monthly fee.

You can connect with me via LinkedIn if you what to discuss deeper tech issues or implementation details. I'm happy to share my experiences.

HTH /Michael

Comment
There are no comments made yet.
Marc James Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 22:15 PM UTC
  2. PowerBuilder
  3. # 6

Thanks Kevin, yes I don't think I'll have a problem collecting each drivers GPS coordinates, they will need to login to a mobile_server application on their personal mobile phones (customer has said this is how they want it, no permanent cab devices!) Once they are logged in, I'll have a timer running every 30 seconds to grab their coordinates and update a database with each vehicle in it.

I need to know of a way to display an overlay like you can in this mobile demo https://youtu.be/0nalRw9U7UQ

But I'll need to do that from a computer, be it web server through browser or on a compiled exe

Thanks for the reply, if you can find out that would be great

Comment
  1. Kevin Ridley
  2. Wednesday, 22 January 2020 12:27 PM UTC
I don't know what the exact usage is here, but if you allow people to login from their phones it could lead to erroneous and possibly fraudulent data. If the data needs to be tied to a particular vehicle but you are tying it to a phone, obviously the data can come from the phone being in a different vehicle. Anyway to display, look into using PowerServer Web with the ArcGIS Pro from Esri. https://www.esri.com/en-us/store/arcgis-pro
  1. Helpful
  1. Marc James
  2. Wednesday, 22 January 2020 15:39 PM UTC
As part of the driver login requirements, they have to enter the vehicle reg.
  1. Helpful
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 22:08 PM UTC
  2. PowerBuilder
  3. # 7

If I understand you correctly and the end game is to display your "fleet" of vehicles on a map on a desktop device, this is very similar to something I did in ~2005/2006.  You can break down what needs to be done in 2 major tasks.  First, you need to receive and store GPS data from your vehicles.  Second, you need to display this data on a map.  For the first part, you're going to need some sort of GPS device on each vehicle.  We used a GPS unit that sent the data in UDP packets to an ip address where we had a Java app running on EA Server.  The Java app processed the udp packets and loaded the data to the Database.  We then used an ARCGIS Active X to display the vehicles on a map in a PowerBuilder client.  Maybe someone from the PowerServer Web side can comment on if it's possible to process udp packets?  Since this was over 10 years ago, I'd imagine GPS devices are capable of sending the data in different formats now too, so check with the GPS unit providers.  You can probably also send from a phone as well, but I'd imagine you'd want a device permanently mounted on your vehicles instead.  As far as displaying the data on the map, I know the company I worked for has since converted to PowerServer Web, and last I heard it was working very well for them.  I can try to reach out to someone from the company if you'd like.  Just send me a message via LinkedIN.

 

Kevin

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.