Home ยป App Development ยป Mobile Application Development ยป Progressive Web Apps ยป Turbocharge Your Logistics Business With Powerful Geocoding APIs And Progressive Web Apps

Turbocharge Your Logistics Business With Powerful Geocoding APIs And Progressive Web Apps

Published On June 17, 2021

Build Robust Applications 3x Faster

Keep the light on.

Join our mailing list for development guides and solutions for constant IT innovation.


In a nutshell, the logistics business, and logistics management in general,ย  focuses on ensuring a specific product or material arrives in the right amount in the correct location at the scheduled time. It is a highly complex industry, which requires operators to plan meticulously, provide transparent customer information, follow strict regulatory guidelines, and operate within strict timelines and, of course, budgets.

For these reasons it can be particularly challenging, especially if you lack the right tools to implement effective processes that allow you to remain informed and track shipments along every step of the way.

Of course, developing a logistics management system is not a simple task for many reasons. Developing your own software can be both costly and time-consuming. This is especially true if you are starting from scratch or trying to update outdated legacy systems. In addition, projects can be easily thrown off track or fall behind schedule if you adopt the wrong technology. It is difficult enough to keep pace with todayโ€™s ever-evolving technologies. Itโ€™s even harder to keep your existing systems and applications relevant as business best practices continuously change.

To remain ahead of the curve, logistics business owners often find themselves faced with difficult choices. They need to decide whether to hire more staff and upgrade their systems through brute force or upgrade their existing teams with better development tools. Utilizing REST APIs is on the list of good application modernization strategies.

Virtual LANSA is the Solution You are Looking For

Before you decide to expand your team, however, consider virtual LANSA. Building logistics solutions with Visual LANSA and deploying them as progressive web apps (PWAs) can undoubtedly turbocharge your development process and keep your software development team running smoothly. In this article, we will look at how you can use and easily integrate REST APIs from positionstack with Visual LANSA. We will explore the best way to leverage features like Embeddable Maps and Forward and Reverse Geocoding you in your logistics systems. And you can do it all in low code and Visual LANSA.

LANSAโ€™s low-code development platform instantly transforms everyone on your team into a full-stack developer. In other words, every developer you employ can work on any part of any application. Visual LANSA ships with full-stack language, a WYSIWYG designer, and one-click deployment to all form-factors.

What are Progressive Web Apps?




The Progressive Web App is based on key concepts that enable the web to be more user-friendly, performant, and interactive. In essence, today’s web has developed into a set of powerful principles which give web applications nearly unlimited possibilities.

Progressive web apps can communicate with native app functionality like the camera on any device. They are also easily installed on both desktop and mobile platforms.

These articles will help you learn more about progressive web apps:

What are REST APIs?

A RESTful API โ€“ or RESTful web service โ€“ is a Representational State Transfer (REST)-based application program interface that uses HTTP requests to GET, PUT, POST, and DELETE data.

REST APIs, regardless of protocol, are popular among developers due to their versatility and the fact that they do not require the installation of additional applications or libraries.

Here is some sample code for executing the Google Geocode REST API from within Visual LANSA:

Define_Com Class(#XPRIM_HttpRequest) Name(#Req)

Define_Com Class(#XPRIM_RandomAccessJsonReader) Name(#Reader)


#Req.DoGet Url('https://maps.googleapis.com/maps/api/geocode/json?...')
* Check if request is successful
If (#Req.Response.IsSuccessHttpStatusCode)
    * Set the JSON reader source fot response from the HTTP request
    #Reader.SetSourceHttpResponse HttpResponse(#Req.Response)
    * Navigate to the 'location' object (containing the 'lat' and 'lng' values)
    * We'll specify a navigation path to navigate to the 'location' element
    * Names and indexes in a path are separated by forward slashes
    #Reader.BeginObjectWithPath Path('results/1/geometry/location')

    * Get the latitude and longitude value
    #Latitude := #Reader.ReadNumberWithName('lat')
    #Longitude := #Reader.ReadNumberWithName('lng')

    * Close "BeginObject" with "EndObject"
    #Reader.EndObject
Endif

Find out more about connecting to a REST API from within Visual LANSA in the documentation.

What is Positionstack?



Positionstack is a REST API that allows you to integrate geocoding into web and mobile applications. The API offers an affordable and easy-to-understand REST API interface for global forward and reverse geocoding in real-time. Positionstack supports most countries around the world and covers over two billion global addresses. The API uses several trusted data sources and provides a high-level of accuracy for every API request made.

Best of all, positionstack is similar to Google’s Geocode API but can be significantly cheaper. Positionstack has a free tier with additional enterprise features available in their paid tiers. The additional enterprise features include embeddable maps, JSON, XML, and GeoJSON support, and batch requests. According to positionstack, they provide “an extensive set of worldwide geocoding data, sourced from high-quality data vendors and updated multiple times per day.”

Here’s a sample video of positionstack’s geocode feature:

positionstack.com is owned by Apilayer, a sister company of LANSA and both owned by Idera,Inc.

How can I use Positionstack in my Logistics Business?

You can use Positionstack to geocode any global address or set of coordinates in real-time. You can also look up location components, country and timezone data, and more.

Here is an example of the API Access Key you receive when you login to the positionstack website.


  • Get your Forward Geocoding endpoint to let you use free-text place names or addresses in your application.



This is a example api code for forward geocoding

  • If you upgrade your positionstack plan, you can use embeddable map URLs.



This is a example api code for embeddable maps

How can I get started using Visual LANSA in my Logistic Business quickly?

Getting started with Visual LANSAย  for your logistics business is pretty simple. The platform ships with a pre-built project that features Google Maps as part of its “Cost Estimator” Progressive Web App.ย  You can either modify and expand on the app using the positionstack API or keep it as is and use the Google Maps API. Either way, you can get started quickly and modify it to meet your business needs.

With Visual LANSAโ€™s hybrid low-code approach you can build entire enterprise applications more efficiently than any other low-code app builder on the market. Essentially, our stack gives developers all the tools they will ever need in one IDE.

Visual LANSA basically streamlines your entire application development process. That means you won’t need to learn other development languages — hybrid low-code eliminates the workarounds needed in other low-code platforms. Whether you are building enterprise progressive web apps or desktop apps, there isnโ€™t a more efficient way to develop applications.

The success of any low-code platform relies on its ability to integrate with everything. It doesn’t matter if your objects are in the cloud, on-premises, or on a local device, server, or workstation. With Visual LANSA, you can directly integrate your data and assets, both new and old.

Think about all the different deployment options that have come and gone over the last decade. Visual LANSA insulates your applications and developers from underlying technologies, permitting IT to swap platforms and databases or migrate to/from the cloud with little disruption.

Below is a demo of the Cost Estimator example app.

Ready to get started? Learn more about how Visual LANSA can help your application development evolve by contacting sales.

A smarter, faster way to deliver business software

ABOUT THE AUTHOR

LANSA Editors

LANSA is a professional low-code development platform that helps businesses efficiently build and modernize software. In this blog, the team draws on decades of experience empowering enterprises to innovate on the IBM i and future-proof their mission-critical systems.

More Articles

Are you ready for better conversations?

Integrated solutions that deliver powerful results.

Keep the light on.

Join our mailing list for development guides and solutions for constant IT innovation.