![]() |
VOOZH | about |
dotnet add package XperienceCommunity.MapLocationSelector --version 2.1.0
NuGet\Install-Package XperienceCommunity.MapLocationSelector -Version 2.1.0
<PackageReference Include="XperienceCommunity.MapLocationSelector" Version="2.1.0" />
<PackageVersion Include="XperienceCommunity.MapLocationSelector" Version="2.1.0" />Directory.Packages.props
<PackageReference Include="XperienceCommunity.MapLocationSelector" />Project file
paket add XperienceCommunity.MapLocationSelector --version 2.1.0
#r "nuget: XperienceCommunity.MapLocationSelector, 2.1.0"
#:package XperienceCommunity.MapLocationSelector@2.1.0
#addin nuget:?package=XperienceCommunity.MapLocationSelector&version=2.1.0Install as a Cake Addin
#tool nuget:?package=XperienceCommunity.MapLocationSelector&version=2.1.0Install as a Cake Tool
Adds a map selector UI form component for Xperience by Kentico admin site. Can be used for content type fields and page builder widget fields.
The UI form component can be used for fields on a content type, and renders like this on the content tab: <a href="src/images/content-type-property.PNG"> <img src="src/images/content-type-property.PNG" width="600" alt="Map location selector in content type"> </a>
The component can also be used for widget properties and looks like this on the widget configuration window: <a href="src/images/widget-property.PNG"> <img src="src/images/widget-property.PNG" width="600" alt="Map location selector in widget"> </a>
| Xperience Version | Library Version |
|---|---|
| >= 30.11.1 | 2.0.0 |
| >= 28.2.0 | 1.0.0 |
Add the package to your application using the .NET CLI
dotnet add package XperienceCommunity.MapLocationSelector
Install NuGet package above.
Add configuration block to the ASP.NET Core appsettings.json file:
"xperiencecommunity.maplocation": {
"MapLatitude": "<your default latitude, e.g. 53.799009663238486>",
"MapLongitude": "<your default longitude, e.g. -1.549048364271424>"
"MapZoom": <your default zoom level, e.g. 10>
"ManualEntry": <true or false, whether to allow manual entry of lat/long>
}
Register the configuration block using builder.Services.AddXperienceCommunityMapLocationSelector():
// Program.cs
var builder = WebApplication.CreateBuilder(args);
// ...
builder.Services.AddXperienceCommunityMapLocationSelector(builder.Configuration);
At this point the UI form component will be registered for fields in content types.
The value stored in the database when saved will either be an empty string (if no location selected), or in the format of 53.799009663238486,-1.549048364271424. The latitude and longitude are comma separated.
If you need to use in widget properies too, then follow the next step to configure the widget.
Use the MapLocationFormComponent attribute to add a property in your widget property configuration class.
using XperienceCommunity.MapLocationSelector;
public class ExampleWidgetProperties : IWidgetProperties
{
[MapLocationFormComponent(Label = "Location", Order = 1)]
public string Location { get; set; }
}
Feel free to submit issues or pull requests to the repository, this is a community package and everyone is welcome to support.
Distributed under the MIT License. See for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.