Support the ongoing development of Laravel.io →
posted 10 years ago
Views Forms
Last updated 2 years ago.
0

For any future commenters, here's cleaned up source code. OP, at least check your post. How can anyone understand that code?

var g = new L.GPX('<?php echo APP_BASE;?><?php echo $gpx; ?>', {
    async: true,
    marker_options: {
        startIconUrl: '<?php echo APP_BASE;?>/leaflet-elevator/lib/leaflet-gpx/pin-icon-start.png',
        endIconUrl: '<?php echo APP_BASE;?>/leaflet-elevator/lib/leaflet-gpx/pin-icon-end.png',
        shadowUrl: '<?php echo APP_BASE;?>/leaflet-elevator/lib/leaflet-gpx/pin-shadow.png'
    }
});

var g = new L.GPX({
    {
        URL::asset({
            {
                $trail - > gpx
            }
        })
    }
}, {
    async: true,
    marker_options: {
        startIconUrl: {
            {
                URL::asset('/leaflet-elevator/lib/leaflet-gpx/pin-icon-start.png')
            }
        },
        endIconUrl: {
            {
                URL::asset('/leaflet-elevator/lib/leaflet-gpx/pin-icon-end.png')
            }
        },
        shadowUrl: {
            {
                URL::asset('/leaflet-elevator/lib/leaflet-gpx/pin-shadow.png')
            }
        }
    }
});
Last updated 2 years ago.
0

Anyway, what errors do you get when you run the code? Could you copy and paste error messages from your browser console?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

elecdesa elecdesa Joined 12 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.