Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Nov 21, 2017 @ 14:38
    Ismail Mayat
    1

    Rendering issue

    Hello,

    I am using umbraco 7.7.2. I already had angularmaps package installed. I then installed terratype and ran an umbraco migrations to convert the data to terratype. In the backoffice map renders fine json looks like:

    {"position": {
    "id": "WGS84",
    "datum": "51.565902,-0.037393"},"zoom": 15,"height": 0}
    

    In the template I am trying todo:

    @Html.Terratype(Model.Content.TerratypeGooglemap)
    

    In the generated model via modelsbuilder we have:

            [ImplementPropertyType("terratypeGooglemap")]
        public Terratype.Models.Model TerratypeGooglemap
        {
            get { return this.GetPropertyValue<Terratype.Models.Model>("terratypeGooglemap"); }
        }
    

    When i hit page i get the following error:

    Error reading JObject from JsonReader. Path '', line 0, position 0.
    

    Its erroring on models builder property.

    Am i missing something? Is the issue that there is property converter interfering?

    Regards

    Ismail

  • Jonathan Richards 288 posts 1742 karma points MVP
    Nov 22, 2017 @ 09:59
    Jonathan Richards
    1

    Hi Ismail,

    I know we have been having a few conversations using various different methods.

    The important difference between how you are using Terratype verses others, is that you are trying to generate Terratype property values using the Terratype.Models.Model type yourself, instead of just allowing content editors to set markers. Obviously if you have thousands of maps, manually setting them isn't an option.

    1. I still have outstanding to repeat all the steps you are doing. I have tested specifically using Umbraco 7.7.2 with the json you posted and it renders for me. But I do need to repeat the process of de-serializing that json block back to Terratype.Models.Model that looks like where the error is happening.

    2. I did start writing some code, a few months ago, that automatically upgrades AngularGoogleMaps values to Terratype. Negating your need to do any of this. This code though isn't ready for release yet. My plan was to dedicate some time for this over Christmas.

    If you can bare with me, I do plan to continue investigating tonight and am giving your issue active thought time.

    Cheers

    Jonathan

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Nov 22, 2017 @ 11:38
    Ismail Mayat
    1

    Jon,

    The latest package update has i think fixed my issue. I still on some pages need to republish which is weird as i re publish as part of migration.

    Anyhow nearly there thanks for all your help much appreciated.

    Regards

    Ismail

  • Jonathan Richards 288 posts 1742 karma points MVP
    Jan 07, 2018 @ 18:44
    Jonathan Richards
    1

    New version 1.0.15 has a fix for this issue.

Please Sign in or register to post replies

Write your reply to:

Draft