TMS Software. All-Access

Google Maps heat maps

We recently received a question whether TMS FNC Maps supports heat maps. Heat maps are supported in Google Maps and we immediately went exploring the capabilities upon this request. More info and a sample about heat maps can be found here: https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap. TMS FNC Maps comes with a lot of great functionality as well as a (lesser visible) customization events and methods to add your own extensions. To add support for heat maps, we had to override 2 virtuals and we can do this by inheriting from the TTMSFNCGoogleMaps class. Customizing the API URL TTMSFNCMaps (and TTMSFNCGoogleMaps), expose a lot of virtuals to extend and customize existing or new functionality. To support heat maps, we needed to add an extra parameter to the URL that is required to load the Google Maps JavaScript API. This can be done by overriding the GetHeadLinks procedure. procedure GetHeadLinks(AList: TTMSFNCMapsLinksList; ACheckReady: Boolean = True); override; Additionally, we need to change the link to include an additional parameter: “libraries=visualization” to enable the library required to load the heat map layer. procedure TTMSFNCGoogleMapsEx.GetHeadLinks(AList: TTMSFNCMapsLinksList;   ACheckReady: Boolean); begin   AList.Add(TTMSFNCMapsLink.CreateScript(‘https://maps.googleapis.com/maps/api/js?key=’ + MapsProperties.GetAPIKey + ‘&language=’ +     MapsProperties.GetLocale + ‘&libraries=visualization’, ‘text/javascript’, ‘utf-8’, ”, True, True)); end; Adding additional JavaScript functionality After extending the API URL to load the required libraries we need to add custom JavaScript to visualize the heat map. According to the sample (following the link at the top), we need to add code to visualize heat maps in San Francisco. To add custom JavaScript functionality, override the DoCustomizeMap virtual. procedure DoCustomizeMap(var ACustomizeMap: string); override; The code specified in the sample translated to Delphi code is shown below. procedure TTMSFNCGoogleMapsEx.DoCustomizeMap(var ACustomizeMap: string); var   h: string; begin   h := ‘var heatMapData = [‘ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.447), weight: 0.5},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.445),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.443), weight: 2},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.441), weight: 3},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.439), weight: 2},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.437),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.435), weight: 0.5},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.447), weight: 3},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.445), weight: 2},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.443),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.441), weight: 0.5},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.439),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.437), weight: 2},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.435), weight: 3}’ + LB +   ‘];’ + LB +   ‘var heatmap = new ‘ + MAPSERVICEVAR + ‘.visualization.HeatmapLayer({‘ + LB +   ‘  data: heatMapData’ + LB +   ‘});’ + LB +   ‘heatmap.setMap(‘ + MAPVAR + ‘);’;   ACustomizeMap := h;   inherited; end; Bundling this all together produces the following result. The complete code snippet (written in FMX, but can be used in any framework) unit UGoogleMapsHeatMap; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, […]

Read More

Another webinar with another first …

If any of these technologies are of interest to you, we have a new webinar coming up with another first!Reserve your first class seat now while it can here.  We will show you for the first time in public, the latest state of project Miletus in TMS WEB Core.  To give you a hint, we only show today this screenshot: First time you hear about the word Miletus? Read up here and then reserve your seat!  With your registration, you’ll see & discover it first-hand in our online webinar running in our own fully web-based TMS Web Academy platform developed here using TMS WEB Core for Visual Studio. We look forward to meet you in the webinar and discuss via the platform the many new capabilities that open up for Delphi developers.  See you!

Read More

Discover our wide range of TMS FNC Components

FNC stands for Framework Neutral Components. This means that the components can be used cross-framework and cross-platform. With our TMS FNC Component studio bundle you will get access to all our current FNC components! That is not all! You will save over 45% now and even more with new free FNC component releases! All products come with perpetual licenses and 1 year of FREE updates & support. Subscriptions can be extended for another year at 70% discount! Products included in the bundle: Get full access to FNC components: Components for Delphi & C++Builder that can be used in all project types. Only one learning curve: VCL, FMX, LCL and WEB. Target Windows, macOS, iOS, Android, Linux and WEB. Growing range of components, new products on the way. Yearly renewal only 145 EUR* instead of regular 495 EUR. All products accessible via TMS Subscription Manager tool. Full online support through TMS Support Center. *The price is valid for this moment & depends on the price of the pack at the moment of renewal. Learn More: Want to learn more about FNC and how you can benefit from it? Join us on our upcoming webinar: “What is FNC : Introduction to the growing family of FNC technology based components“, on June 22, 2021. Act now: Find out more about our products included in TMS FNC Component Studio and get your license today! NOTE: Contact sales for special upgrading pricing for existing customers of other products.

Read More

TMS WEB Core & FNC trial support

A small update with a big impact We have recently changed the way the trial version is being built and now works together with other TMS WEB Core enabled products. Evaluating a product before considering a purchase is important and therefore we have bundled all of our resources and investigated a solution for the ongoing issues trying out the combination of trial FNC & trial TMS WEB Core. Today we can announce there are no issues compiling FNC trial & TMS WEB core trial together. Enjoy and test the trial version of the following products in combination with TMS WEB Core trial today! In case you didn’t notice This week is also FNC week. Please read the following blog post to know more about FNC & FNC Studio and the benefits it has to offer: https://tmssoftware.com/site/blog.asp?post=806

Read More

JSON backstage pass for TMS WebCore developers

2. First things first In the previous section we used the terms JSON and JavaScript object. But what is it exactly and what are the differences? In JavaScript, a variable can contain a simple value as well as an object or an array. // JavaScript let i = 5; let s = ‘some text’; let o = { a = ‘text’, b = i } In this example the variable o contains a JavaScript object with the two attributes a and b where a contains a text and b contains a number. In TMS WEB Core there is a type JSVALUE for the value of a variable from the JavaScript world. Whenever we want to access the value of a JavaScript variable, we can use the JSVALUE type for it. // WEBCore function sampleJavascriptVariable : JSVALUE; assembler; asm let i = 5; return i; end; procedure AccessJsvalue; var javascriptvalue: JSVALUE; i: integer; begin javascriptvalue := sampleJavascriptVariable; // value will now contain the JavaScript VALUE (hence JSVALUE) 5 i := integer(javascriptvalue); // we needed to typecast javascriptvalue to integer because the compiler // doesn’t know the type of the value actually stored in that variable end; So whenever we want to access JavaScript values directly from TMS WEB Core, we need a typecast to tell the compiler which type the value in the variable with the type JSVALUE contains. This is already cumbersome with simple types and also error-prone and it gets even more complex when we want to access JavaScript objects. Let’s summarize: A JavaScript object is an object in the JavaScript world that is stored in an internal representation in a JavaScript variable. To store such a JavaScript object in an Object Pascal variable in TMS WEB Core, the object pascal type JSVALUE is available. And what has all this to do with JSON ? JSON (JavaScript Object Notation) is a string that represents a JavaScript object. A JavaScript object can be converted to JSON and a JSON string can be converted to a JavaScript object. More information about the syntax definition of JSON can be found here: https://www.json.org/json-en.html. Whenever we talk about JSON, we mean a string from an Object Pascal point of view. Whenever we talk about a JavaScript object we mean a JSVALUE from an Object Pascal point of view. // WEBCore var json: String; javascriptobject: JSValue; begin json := ‘{ “x” : 5, “y” : 7 }’; javascriptobject := TJSJSON.parse(json); end; In this example the JSON variable contains a JSON representation (data type String) of an object with the members x and y, both containing numbers. This string is parsed into a JavaScript object using the static method TJSJSON.parse() and stored in the variable javascriptobject. Note: All sample sources use only the units that are already automatically included in the uses list of a standard TMS WEB Core web project. So you can try and reproduce everything directly in TMS WEB Core when you include the source texts in the unit1.pas of a newly created project. To keep the example source code short, only necessary code is shown, in real world code you would need to add some exception handling here and there… All well and good, now we have a JavaScript object in an Object Pascal JSVALUE variable in TMS WEB Core. But how […]

Read More

Keep up with the latest developments!

Everything evolves so incredibly fast in the software world! So our team is also trying really hard to keep up with the latest developments. And to give our customers access to all our latest developments we have created our no-nonsense subscription TMS ALL-ACCESS! Because we want our customers to be able to use all our products with no restrictions or limitations. And when we say ALL we really mean ALL our products we offer now and also all new products we’ll release in the year of the subscription. Moreover, our all-access users are the first to receive the previews and betas of our non-released products! Here is a small overview of the new products we added in 2021: January 2021: TMS VCL UI Pack v10.4: Powerful, extensive & flexible component suite for native Excel report & file generation & manipulation for VCL & FireMonkey TMS FNC Cloud Pack v1.3: Seamless access to cloud services from Windows, cross-platform and the web TMS WEB Core v1.6: Framework for creating modern web applications February 2021: March 2021:  April 2021:  May 2021:  Get full access with:  Easy plan: All current and new products for 1 price! Easy renewal: Yearly renewal only for 495 EUR! Easy install: all products accessible via TMS Subscription Manager tool Easy support: Full online support center access to all areas Easy up-to-date: Early access to product betas Easy learning: Access to TMS WEB Academy Act now: So what are you waiting for? Find out more about our products included in TMS ALL-ACCESS. NOTE: Contact sales for special upgrading pricing for existing customers of other products.

Read More

Custom control development with TMS WEB Core for Visual Studio Code, an intern reports

At tmssoftware.com we love to have interns. I believe it is a fantastic experience to learn young aspiring software developers about Delphi, its eco-system, its amazing productivity and at the same time, absorb a lot of energy, get new fresh ideas and get to know what drives and motivates the next generation of software developers. So, also this school year, we had 2 interns learning all about Delphi, TMS WEB Core, Object Pascal, components and much more here at tmssoftware.com. Today, we want to give the word to our intern, and very soon colleague, Bradley who did a lot of stunning work this school year and tells in his first blog post about building his first custom control for TMS WEB Core. Nothing but an amazing and exciting story! So, with pleasure, I give the word to Bradley: A first custom web control Having only one year experience using Delphi and TMS WEB Core, I was assigned the (at first sight) daunting task of developing my first ever custom web control, namely a chat box control. I had only been developing web applications since I joined tmssoftware.com as an intern, so clearly writing a component was something completely new. Using the available documentation and the experience of my mentor Bruno I quickly obtained the necessary skills for developing a TMS WEB Core custom control, the TWebChatBox control. First steps To gain some experience, I first developed another very small control, a custom toggle button control to switch a web application between full-screen and normal mode. I went for developing the custom control directly from TMS WEB Core for Visual Studio Code because I just feel more comfortable for web projects to use this IDE. I had the “privilege” to use first the alpha and then the beta version of TMS WEB Core for Visual Studio Code v1.3 (released yesterday btw) as this introduced component package support. Using the new package support for installing custom controls made it very easy to test the control, also at design-time. The development of this first small control allowed me to get used to the concept of custom controls as well as the steps involved to get it installed in the IDE. Starting the chatbox implementation After I was comfortable enough with the principle of custom controls. I’ve started building the chat box component. As there were a ton of features on the requirements list, I had actually no idea where to start. I’ve focused first of all on a working way of sending/receiving messages. When I had that going, I started focusing on adding a basic design, followed up by adding the necessary properties for manipulating said chat box.  I think implementing collections as a way of managing messages was the only thing I really struggled with. Having never implemented anything like this, figuring out how to implement the chat message bubbles at collection item level was a challenge. If you add a message to your collection, a chat message bubble will be generated and displayed in the chat control. The collection item will also keep a reference of the chat message bubble so that you can manipulate it later on. A chat bubble contains several HTML elements. We have a SPAN for the message. For the user avatar there is an IMG element. […]

Read More

TMS WEB Core for Visual Studio Code v1.3 released

Today is an exciting day as we reached yet another milestone, this time the release of TMS WEB Core for Visual Studio Code v1.3. You are an Object Pascal expert, your customers look out to access your applications everywhere via the web and without any install hassle, you love the RAD component based development methodology, you can do this software development from the operating system you love … then having a look at TMS WEB Core for Visual Studio Code v1.3 will open a whole new world!  What brings TMS WEB Core for Visual Studio Code Fully Object Pascal based web development RAD component methodology driven fast & productive development  Hosted in a free hugely popular IDE for web developers Running on Windows, macOS and Linux Using a WYSIWYG form designer A framework that has a similarities with the familiar VCL framework where possible  What is on the table in v1.3 This major update is packed with significant new features: Support for packages Yes, from now on, it is easy to create your own custom components and compile & install these for use at design-time. The package system is similar to how you can use packages to install components in the Delphi IDE or Lazarus Support for workspaces With workspaces, now you can have multiple projects in a folder and activate and select which project to compile/run/debug. Support for using the entire FNC component suite As our entire set of FNC components is ready for use in web client applications, the new package support in TMS WEB Core for Visual Studio Code enables to install all TMS FNC components in the TMS WEB Core for Visual Studio Code IDE. The latest FNC registered version updates released last week contain all the required packages for this. Brings the framework up-to-date with latest version as available in TMS WEB Core for Delphi/Lazarus v1.7 The TMS WEB Core framework that comes with TMS WEB Core for Visual Studio Code is now in sync and up-to-date with the latest release of TMS WEB Core for Delphi. This means that all new components and component improvements are now also available for Visual Studio Code users. This includes the new USB components, local file access components, new Firestore dataset capabilities, extensions to grids, web socket connection improvements and much more…  One important note though, the Miletus application type is not yet in our release for Visual Studio Code release but scheduled for the next release.  Get started! There are several ways to get started with TMS WEB Core for Visual Studio Code TMS ALL-ACCESS users have immediate & free access to TMS WEB Core for Visual Studio Code TMS WEB Core for Visual Studio Code registered users will find the new release now on your “My Products” page A fully functional trial version for Windows, macOS or Linux is available We have a webinar coming up that will guide you around the IDE, the framework, the possibilities Check more details about FNC and using FNC components from Visual Studio code in this blog  Learn how to use packages, write your own components or use FNC components We have already two videos for you and more are coming. Chief architect José Leon Serna explains how to start using packages: José Leon Serna and Bruno Fierens host a […]

Read More

#WEBINARS #WEBINARS #WEBINARS

Ever since we introduced our TMS WEB Academy platform (entirely built using our own TMS WEB Core product by the way) in February this year, it has been popular and much appreciated. Accelerated by the COVID19 pandemic, it is here to stay as a (free) way to learn about software development and directly communicate and interact with our experts during focused webinars.  So, today, we announce 3 new free webinars coming up in June! Introduction to TMS WEB Core for Visual Studio Code June 3, 15h00 UTC You want to use your favorite Object Pascal language. You want to develop web client applications. You want to use an IDE directly on Windows or macOS or a Linux machine. You want to use RAD component based development methodology. Then we have this webinar for you where we introduce TMS WEB Core for Visual Studio Code. No prior knowledge or experience required, we will take you through the steps to create your first web client applications with this hugely popular free IDE and TMS WEB Core. Miletus : Using web technology to create cross-platform desktop applications June 10, 15h00 UTC You have customers who prefer a web application? You have customers who prefer a desktop application? You want to take advantage of web technology to create stunning user interfaces? You want an easy way to use local databases? With Miletus coming with TMS WEB Core, you can do it all. In this webinar, we show you what Miletus is, what you can use it for, how you can use it. Learn in just one hour webinar how to build a database powered, cross-platform desktop app with a good looking web front-end running on Windows, macOS or Linux.    Sign up for the webinar here  What is FNC : Introduction to the growing family of FNC technology based components June 17, 15h00 UTC You heard about this yet another TLA (Three-Letter-Acronym) FNC but are unsure what it stands for and why and how you can benefit from it? In this webinar, we explain the basics of what FNC is, how it is created, what FNC components and products exist meanwhile. Whether you are a Delphi VCL classic Windows application developer, a Delphi FMX cross-platform developer, a developer wanting to create web applications or a developer preferring free IDEs like Lazarus or Visual Studio Code, FNC will empower you in any scenario. Learn all about this in this webinar and never forget anymore what the TLA FNC stands for. Sign up for the webinar here  More webinars? If you have ideas, let us know what you want to see covered in upcoming webinars! We are eager to learn where we can add value with content offered via a webinar. Or, if you created a great application or have an original or creative use case for any of our products and you feel like presenting this to your fellow Delphi developers, don’t hesitate to reach out and you could be next offering a webinar on our TMS Web Academy.Or meanwhile you can have a look at the previous webinars we offered and for which the recorded sessions are available.

Read More

Freebie Friday: TMS FNC Maps helper functions

We are back with another freebie friday! TMS FNC Maps comes with a lot of great functionality as well as a (lesser visible) unit bundling helper functions to empower your developments. The unit is called (FMX.)TMSFNCMapsCommonTypes.pas. The prefix FMX., can be replaced with VCL., WEBLib. or LCL depending on the framework. Below are a couple of helper functions explained to help you in write your code more efficiently or add more complex functionality to your application. Plus Codes Plus Codes are like street addresses for people or places that don’t have one. Instead of addresses with street names and numbers, Plus Codes are based on latitude and longitude, and displayed as numbers and letters. With a Plus Code, people can receive deliveries, access emergency and social services, or just help other people find them. source: https://maps.google.com/pluscodes/ TMS FNC Maps supports Plus Codes encoding & decoding with the TTMSFNCMapsPlusCode class. To get started, and convert an existing coordinate to a Plus Code, use the following code: procedure TForm1.EncodeCoordinate; var p: string; begin p := TTMSFNCMapsPlusCode.Encode(CreateCoordinate(40.689188, -74.044562)); //p = ’87G7MXQ4+M5′ end; To decode a Plus Code to a coordinate bounds, which defines the area corresponding to the code, the Decode function can be used: procedure TForm1.DecodePlusCode; var c: TTMSFNCMapsBoundsRec; begin c := TTMSFNCMapsPlusCode.Decode(’87G7MXQ4+M5′);  end;  Measuring distance between 2 coordinates Another great utility function is to measure the distance (in meters) between 2 coordinates. The distance measured is based on the average earth radius (6371000 meters). The sample below demonstrates how to measure the distance between 2 coordinates, but also how to create bounds, create a circle, calculate a new coordinate based on the bearing and many more. procedure TForm1.AddCircle; var   b: TTMSFNCMapsBoundsRec;   d, br: Double;   c: TTMSFNCMapsCoordinateRec;   I: Integer; begin   b := CreateBounds(40.76437, -73.94928, 40.76799, -73.98235);   d := MeasureDistance(b.NorthEast, b.SouthWest);   c := CalculateCoordinate(b.NorthEast, CalculateBearing(b.NorthEast, b.SouthWest), d);   TMSFNCMaps1.BeginUpdate;   with TMSFNCMaps1.AddCircle(b.NorthEast, Round(MeasureDistance(b.NorthEast, b.SouthWest) / 2)) do   begin     FillColor := gcRed;     FillOpacity := 0.5;     StrokeWidth := 10;     StrokeColor := gcPink;   end;   TMSFNCMaps1.EndUpdate; end;

Read More