Kentico 12 MVC Map Location Form Component

27/07/2020

When building websites in Kentico 12, there are two different development approaches you can choose from.

One option is the traditional Portal Engine development model which offers plenty of out of the box functionality, e.g. form controls, widgets, and other modules that content editors have become used to.  However, when choosing the MVC development model, you benefit from gaining full control over the implementation of your website, but lose out on a number of out of the box features previously found in Portal Engine.

Common development tasks when working on Kentico 12 MVC include creating page builder widgets, and also developing form components which allow content editors to configure these page builder widgets.  These tasks can be quite repetitive if you're adding the same widgets and form components to each website you build, a good way of alleviating the repetitiveness is to package up the most commonly used tools into NuGet packages and then share them with the Kentico community on the marketplace for others to use.

The first tool I've uploaded to the Kentico marketplace is the Kentico 12 MVC Map Location Form Component.  This allows content editors to select a location on a map and stores the selected latitude and longitude values against the page builder widget.  You can then use a map plugin (e.g. Google Maps, Bing Maps, OpenStreetMap) to display a map location using the GeoCoordinate property.

Example widget properties demonstrating the location form component.

You can view the source code over at the GitHub repository.  Feel free to look around the project, provide suggestions by submitting an Issue, or submit new features through a pull request