Copied to clipboard

Flag this post as spam?

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


  • carl 12 posts 81 karma points
    May 16, 2019 @ 20:49
    carl
    0

    LeaftetV1

    Good afternoon Jonathan, The Leaflet map displaying in Umbraco but I’m not seeing it in the front end of the website. I’m running Umbraco Version 7.13.0. I’m pointing my datatype “Leafletmap” to the page that I want it to be displayed and when I inspect the page, I can see it leafletmap being called but it’s not displaying on the actual page. It’s working perfectly when I use Google map instead of Leaflet but I want to use Leaflet for the interactivity side of it. I’m using the following code.

    @model Lab.Web.Models.ViewModels.HomeListViewModel
    @using Terratype
    <div class="wrapper buffer">
    <h1 class="hdg hdg_h1 mix-hdg_bold vr">@Model.Headline</h1>
    <h3 class="hdg hdg_h3 mix-hdg_bold vr">@Model.Subheadline</h3>
    <div class="vr_2n userContent">
        @Html.Raw(Model.BodyContent)
        @{
    
        var map = Model.Content.GetPropertyValue<Terratype.Models.Model> 
          ("Leafletmap");
            @Html.Terratype(map)               
        }
    
       </div
    

    The error message displayed in the console tab is “Uncaught ReferenceError: L is not defined” and when I open the error message, I see what’s displaying in the attachment below. enter image description here

    Your help would be much appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft