Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Adding the GoogleMapsEditor not working

$
0
0

I'm having issues adding the GoogleMapsEditor https://nuget.episerver.com/package?id=EPiServer.GoogleMapsEditor

I have a local block

public class CoordinatesBlock : SiteBlockData, IGoogleMapsCoordinates
    {
        public virtual double Longitude { get; set; }
        public virtual double Latitude { get; set; }
    }

If I understand it correctly the editor should automatically be added to propertyes having a type inheriting from this class so this would work?

[Display(GroupName = SystemTabNames.Content, Order = 900)]
        public virtual CoordinatesBlock Coordinates { get; set; }

However it doesn't. In the editor mode the block is added with just two basic input fields like a regular block.

Adding either of these attributes result in the same behaviour:

 [UIHint(GoogleMapsEditorDescriptor.UIHint)]
        [Display(GroupName = SystemTabNames.Content, Order = 900)]
        public virtual CoordinatesBlock Coordinates { get; set; }
//Or my custom editordescriptor available in the 1.0.12 update to set our own api-key
 [UIHint(CustomGoogleMapsEditorDescriptor.UIHint)]
        [Display(GroupName = SystemTabNames.Content, Order = 900)]
        public virtual CoordinatesBlock Coordinates { get; set; }

But, adding this attribute result in an error in edit mode stating that /EPiServer/Shell/11.17.0/ClientResources/googlemapseditor/Editor.js is not found

[ClientEditor(ClientEditingClass = "googlemapseditor/Editor")]
        [Display(GroupName = SystemTabNames.Content, Order = 900)]
        public virtual CoordinatesBlock Coordinates { get; set; }

What is the correct way to get this to work? TargetFramework 4.6.2, Epi version 11.11.3


Viewing all articles
Browse latest Browse all 6894

Trending Articles