NetC.MapLocationFormComponent.Kentico.MVC 12.29.3

dotnet add package NetC.MapLocationFormComponent.Kentico.MVC --version 12.29.3                
NuGet\Install-Package NetC.MapLocationFormComponent.Kentico.MVC -Version 12.29.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetC.MapLocationFormComponent.Kentico.MVC" Version="12.29.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetC.MapLocationFormComponent.Kentico.MVC --version 12.29.3                
#r "nuget: NetC.MapLocationFormComponent.Kentico.MVC, 12.29.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NetC.MapLocationFormComponent.Kentico.MVC as a Cake Addin
#addin nuget:?package=NetC.MapLocationFormComponent.Kentico.MVC&version=12.29.3

// Install NetC.MapLocationFormComponent.Kentico.MVC as a Cake Tool
#tool nuget:?package=NetC.MapLocationFormComponent.Kentico.MVC&version=12.29.3                

Kentico 12 MVC Map Location Form Component

map-location-form-component for Kentico MVC, adds the ability for a content editor to capture a latitude/longitude value by clicking a location on a map.

Nuget Package

https://www.nuget.org/packages/NetC.MapLocationFormComponent.Kentico.MVC/

Example use

  1. Include a property within an MVC widget property class:
using System.Device.Location;
using NetC.MapLocationFormComponent.Kentico.MVC;
[EditingComponent(MapLocationSelectorComponent.IDENTIFIER, Label = "Location")]
/// <summary>
/// Map Location field input.
/// </summary>
public GeoCoordinate Location { get; set; }
  1. Complete setting up the MVC widget itself, maybe you want to pass the individual values for Latitude and Longitude to your widget view model:
return PartialView("Widgets/_BannerWidget", new BannerWidgetViewModel
{
	Latitude = properties.Location?.Latitude ?? 0,
	Longitude = properties.Location?.Longitude ?? 0,
	Image = image,
	Text = properties.Text,
	LinkUrl = properties.LinkUrl,
	LinkTitle = properties.LinkTitle
});
  1. Add the widget to an MVC page, and open the config window to see the new property available: form component image

⌨️ Contributions, 🐛 bug fixes and 📜 license

Feel free to Fork and submit pull requests to contribute.

You can submit bugs through the issue list and we will get to them as soon as we can, unless you want to fix it yourself and submit a pull request!

Check the LICENSE.txt for License information

Compatibility

Can be used on any Kentico 12 SP site (hotfix 29 or above).

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
12.29.3 869 9/23/2019
12.29.2 565 9/22/2019
12.29.1 611 9/22/2019

Changed to use built-in GeoCoordinate class instead of MapLocation