|
POST
|
I want to display the city/cities as a clickable layer what is a 'clickable layer'? the city looks like a dot what do you expect the cities to look like? you'll have to be a lot more specific about what exactly what you're trying to accomplish and what you've already tried in order for someone to be able to help you.
... View more
10-13-2015
05:44 PM
|
0
|
3
|
1490
|
|
POST
|
the easiest thing to do would just be to listen for the 'click' event of your featureLayer and use that opportunity to retrieve its bounds and pass them to the map. featureLayer.on('click', function(evt) {
// http://leafletjs.com/reference.html#featuregroup-getbounds
var bounds = evt.layer.getBounds()
// http://leafletjs.com/reference.html#map-fitbounds
map.fitBounds(bounds);
}); this is possible because 'L.esri.FeatureLayer' extends 'L.geoJson' and 'L.geoJson' extends 'L.featureGroup', which has a method 'getBounds()'. you can find a working example here. between all the inheritance and the fact that the documentation for Esri Leaflet and Leaflet itself are in two different places, stuff like this can be confusing until you get the hang of it.
... View more
09-28-2015
10:21 AM
|
1
|
1
|
1689
|
|
POST
|
Esri Leaflet only falls back onto JSONP when POSTing from a client browser that doesn't support CORS. if you'd like to trick our plugin into thinking that the end users browser doesn't support CORS, you can call... L.esri.Support.cors = false; Afterward, when calling L.esri.request(), JSONP will be used if its necessary to POST. // to send a single JSONP ajax request
L.esri.request('http://sampleserver6.arcgisonline.com/arcgis/rest/services/', {
fakeParam: 'value that will push the request length past 2000 characters'
}, function (error, response) {
if (error) {
console.log(error)
} else {
console.log(response)
}
}) If you need to POST across domains, please remember that it will be necessary to invoke a proxy. we'll be updating the API reference soon, so i'll make sure the new information pertaining to L.esri.request() is as clear as possible.
... View more
09-15-2015
01:38 PM
|
0
|
0
|
820
|
|
POST
|
please reread my response to your previous geonet post, as you encountering the exact same problem. Updating an esri-leaftlet app you are still passing the url of the service you'd like to query as a plain string to L.esri.Query(), rather than within the options object which is currently required. var query = L.esri.query(tableURL).where("type like '" + buttonType.value + "'");
// at line 257 needs to be
var query = L.esri.query( { url: tableURL } ).where("type like '" + buttonType.value + "'");
... View more
09-13-2015
10:55 AM
|
0
|
1
|
1525
|
|
POST
|
as explained in the esri-leaflet 1.0.0 release notes, we introduced the breaking change that tasks and layers constructors now expect the url of the corresponding resource to be provided within an options object L.esri.Tasks.query(yourUrl)
// becomes
L.esri.Tasks.query({ url: yourUrl }) the API reference for L.esri.Tasks.query reflects this change as well. you can find information about an equivalent change in the release notes for esri-leaflet-related 0.0.1-beta.2.
... View more
08-25-2015
10:06 PM
|
0
|
1
|
900
|
|
POST
|
you're right. angular was irrelevant. i was able to reproduce what you reported in a requirejs app. heres a simple demo that shows how to get things working correctly with leaflet 1.0.0 and the latest version of esri-leaflet (2.0.0-beta.5) https://dl.dropboxusercontent.com/u/59331579/js/leaflet-requirejs.html
... View more
08-25-2015
03:38 PM
|
1
|
3
|
1666
|
|
POST
|
can you put together a simple repro case to share? i made a simple angular app of my own (without requirejs) and its working okay https://dl.dropboxusercontent.com/u/59331579/js/angular-esri-leaflet.html
... View more
08-25-2015
01:25 PM
|
1
|
5
|
1665
|
|
POST
|
yeah, sorry about all the confusion. i know exactly whats going on. i am in the middle of making some fairly broad sweeping changes to the website and the master branch is currently expecting that you'll insert your own build of the compiled source in order to run the site locally. you have two options: 1. make the same changes in the commit below locally to ensure that you are pointing at the CDN instead. start using esri leaflet cdn · Esri/esri-leaflet@dc3b1c0 · GitHub 2. place your own new build inside site/build/js/ the tl;dr is that now we are using grunt only for building/running the documentation site. in order to compile the source code locally, all you need to do is call 'npm run build'. i expect thats clear as mud. let me know if you have any other questions.
... View more
08-24-2015
02:38 PM
|
1
|
7
|
1665
|
|
POST
|
have you run 'npm install' recently? the prerequisites required to compile the source code have changed significantly in our last couple refactors. if you have, can you confirm that you are running 'npm run build' to compile the source now? because we don't use grunt for that anymore. lastly, are you sure you're attempting to load esri-leaflet 2.0.0 alongside the new 1.0 beta of Leaflet itself? i only mention this because our live website still shows samples that point at 0.7.3.
... View more
08-24-2015
01:47 PM
|
0
|
9
|
1665
|
|
POST
|
check out the tweet below, which links to a jsbin example: Patrick Arlt on Twitter: "@geogangster @bcw_gis Don’t jam it into bindPopup. Just listen for click and handle the popup …
... View more
08-20-2015
11:38 AM
|
0
|
0
|
817
|
|
POST
|
Hi Julie, what have you tried? the first thing i'd suggest would be inserting an HTML <img> tag within your popup template.
... View more
08-20-2015
10:49 AM
|
0
|
2
|
817
|
|
POST
|
i don't understand your question. can you clarify please? you can find a working example of a loading a hosted OSM basemap using L.tileLayer here: http://esri.github.io/esri-leaflet/examples/geocoding-control.html
... View more
08-05-2015
02:52 PM
|
1
|
1
|
1219
|
|
POST
|
i have not seen this. what version of esri-leaflet are you using?
... View more
07-31-2015
08:18 AM
|
0
|
0
|
880
|
|
POST
|
The core team maintaining Esri Leaflet currently has no plans to implement support for loading webmaps via their id, but it would make a viable plugin if anyone else wants to tackle it. see our roadmap for more information.
... View more
06-16-2015
01:55 PM
|
0
|
0
|
3583
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-16-2014 02:35 PM | |
| 1 | 03-15-2013 04:25 PM | |
| 1 | 06-01-2016 10:51 AM | |
| 1 | 12-28-2015 04:46 PM | |
| 1 | 12-28-2015 05:26 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|