November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi,
I think that the easiest way is to use ContentArea property where you will store CoordinatesBlock blocks.
You could annotate this ContentArea with AllowedTypes attribute and then only Location block could be stored in your property.
[AllowedTypes(typeof (CoordinatesBlock))] public virtual ContentArea Locations { get; set; }
Thaks Grzegorz, but in that case, how can I use Ted Gustaf googlemaps editor???
[ClientEditor(ClientEditingClass = "tedgustaf.googlemaps.Editor")]
This solution works as long as the editor must introduce 2 floats for latitude and longitude, without de beauty of Ted Gustaf googlemaps editor, isn't it???.
Regards.
So maybe you could create another block type - ShopCoordinateBlock.
[AllowedTypes(typeof (ShopCoordinatesBlock))] public virtual ContentArea Locations { get; set; } public class ShopCoordinatesBlock: : SiteBlockData { [Display(Name = "Shop 1", GroupName = SystemTabNames.Content, Order = 10)] [ClientEditor(ClientEditingClass = "tedgustaf.googlemaps.Editor")] public virtual CoordinatesBlock shop1 { get; set; } }
Then on the ContentArea you click "Create new block". Only ShopCoordinatesBlock types are allowed. The new block editor appear. In the editor you should have access to Geolocation property editor.
My question is about the way to work with a collection of geolocation points in Editor mode.
I'm working with CoordinatesBlock, and Ted Gustaff googlemaps editor to add geolocation for some shops in a country. With a single CoordinatesBlock for each shop it works really well.
Here is my code: