Tag Info

New answers tagged

2

You should declare the variable rlayer outside of the easybutton function. Try that: var rlayer = null; L.easyButton('fa-level-up', function() { if(rlayer) { map.removeLayer(rlayer); rlayer = null; } else { var routing = L.Routing.control(...); rlayer = L.layerGroup([routing]); map.addLayer(rlayer); } }, 'Display ...


0

I really appreciate all the suggestions, but I never got the esri/dijit/Popup to be moveable and still be able to highlight and copy the text inside. Instead I used a jQuery Dialog, which I figured would be the case but it just took a while to get all the experience needed to make it work the way I wanted it to. My boss and I both worked on it and we still ...


0

Have you looked at http://clustermash.com, they have been able to cluster at least 8 million points of the GeoNames DB on one of their demos. They also show integration with MapQuest and their geocoding and direction API's.


1

Your syntax for the promise is correct (example below) but there are a few other possible issues. You're trying to use geojsonfeatures before your geojson is available when you create the variable named points. Pass an error handler to your promise's then method to catch errors from the call to getJSON (example below). Verify your geojson is valid by using ...


1

Inside your first snippet (the one with jQuery support), try inverting the call to init() and finalizeLayout(), like this: $(document).ready(function() { finalizeLayout(); init(); }); It seems that if you load your map first and then apply the layout, the map is resized and this affects its extent property. Therefore, you need to apply the layout ...



Top 50 recent answers are included