Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ianhoughton 281 posts 605 karma points c-trib
    Apr 13, 2023 @ 09:42
    ianhoughton
    0

    Our.Umbraco.GMaps data issue

    I've installed the Our.Umbraco.GMaps package into a v8 site, and can see / setup the map in the backoffice ok.

    I've selected a point on the map using coordinates, the maps centres, and those values are being saved (see examine pic)

    enter image description here

    When I try and grab those coordinates later in razor, the Address model is completely empty.

    enter image description here

    This is the generated code from modelsbuilder

    ///<summary>
    /// Office Location
    ///</summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.18.7")]
    [ImplementPropertyType("officeLocation")]
    public virtual global::Our.Umbraco.GMaps.Models.Map OfficeLocation => this.Value<global::Our.Umbraco.GMaps.Models.Map>("officeLocation");
    

    What am I doing wrong?

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Apr 13, 2023 @ 12:35
    Nik
    0

    Hi Ian,

    My first guess would be that something is going wrong with the Property Value Converter.

    Is the MapConfig property of the object populated at all?

    If it was me, I'd look to debug the PropertyValueConverter either by attaching the package source code to the project or by duplicating the code and registering my own version of it to see what is coming out of the database and if the parsing/serialisation/deserialistion is working correctly.

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft