leaflet-vector-layers icon indicating copy to clipboard operation
leaflet-vector-layers copied to clipboard

GeoIQ popup not working

Open mpjashby opened this issue 11 years ago • 3 comments

I can't get popups to work on GeoIQ point features using a {braces} type popupTemplate:

<!DOCTYPE html>
<html lang="en-GB">
    <head>
        <title>Leaflet vector layers test</title>

        <link rel="stylesheet" href="http://leaflet.cloudmade.com/dist/leaflet.css">

        <script src="http://leaflet.cloudmade.com/dist/leaflet.js"></script>
        <script src="http://maps.stamen.com/js/tile.stamen.js?v1.2.0"></script>
        <script src="http://www.crimeinlondon.com/js/vendor/lvector.js"></script>
    </head>
    <body>
        <div id="mainboroughmap" style="height: 600px;"></div>
        <script>
            var railMarker = L.Icon.extend({options: {iconUrl: "http://www.crimeinlondon.com/img/atoc-logo-small.png",shadowUrl: null}});
            var stamen2 = new L.StamenTileLayer("toner-lite");
            var boroughmap = new L.Map("mainboroughmap", {
                    layers: [stamen2],
                    maxZoom: 16,
                    minZoom: 13
                }).setView([51.4863683774,-0.101332641196], 15);

            var railstns = new lvector.GeoIQ({dataset: 315350,map:boroughmap,uniqueField: "atcocode",scaleRange: [13,16],symbology: {type: "single",vectorOptions: {icon: new railMarker()}},popupTemplate:'<p>{commonname}</p>',singlePopup:true});
        </script>
    </body>
</html>

Is this a bug or have I got a mistake in my code?

mpjashby avatar Mar 10 '13 13:03 mpjashby