Click here to Skip to main content
16,022,069 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to add Map.ir Map in my web application using .Net core when I write the following code it gives me the error "i18n is not a function jquery-3.2.1.min.js" the following code is working fine in simple html but it is not working in visual studio 2017 view. all the links are accessible and all of them are in wwwroot folder. if you run this code you will no better.


نقشه‎ی ساده – مپ[^]
Hope you help me.
<link href="~/dist/css/mapp.min.css" rel="stylesheet" />
<link href="~/app/css/app.css" rel="stylesheet" />

<div id="app" style="width:100%; height:50%;margin-top:10px; border:2px dashed red; padding:200px"></div>
<script src="~/dist/js/jquery-3.2.1.min.js"></script>
<script src="~/dist/js/mapp.env.js"></script>
<script src="~/dist/js/mapp.min.js"></script>
<script>
    $(document).ready(function () {
        var app = new Mapp({
            element: '#app',
            presets: {
                latlng: {
                    lat: 35.73249,
                    lng: 51.42268,
                },
                zoom: 10
            },
            apiKey: 'my api key'
        });
    });
</script>


What I have tried:

I tried CDN links that I have downloaded and also tried CDN direct links but didn't solve my problems. It only show me a map-loader and give me the error of
Uncaught TypeError: $.i18n is not a function
Posted
Comments
Richard Deeming 3-Sep-24 10:59am    
At a guess, you're missing a reference to the wikimedia/jquery.i18n[^] library.

But you'd need to check with the authors of the Mapp class to be sure.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900