|
POST
|
try map.setZoomAround(<LatLng>, <zoom>); searchControl.on('results', function(data){
results.clearLayers();
// no need to use a for loop if you just want a reference to first match
// for (var i = data.results.length - 1; i >= 0; i--) {
// results.addLayer(L.marker(data.results.latlng));
// }
var resultLocation = data.results[0].latlng;
results.addLayer(L.marker(resultLocation));
// http://leafletjs.com/reference.html#map-setzoomaround
map.setZoomAround(resultLocation, 10);
}); you can find a working sample here.
... View more
05-13-2015
01:58 PM
|
0
|
1
|
1771
|
|
POST
|
none of the core Esri Leaflet maintainers are working on this but we welcome contributions from the community.
... View more
05-12-2015
08:37 AM
|
0
|
0
|
687
|
|
POST
|
you have several issues here: 1. you are trying to load zoom level '16', but you've only got 7 tile levels baked in your actual service. 2. something is wrong with the tiled map service itself. clicking on 'start' or 'end' tile for any of the levels listed here results in a 404 error 3. you should be using 'L.esri.tiledMapLayer', not 'L.esri.Services.mapService' (see example here)
... View more
05-06-2015
10:12 PM
|
0
|
1
|
858
|
|
POST
|
your geocoding service is returning a bogus extent. http://gis.ccpa.net/arcgiswebadaptor/rest/services/CompositeLocator/GeocodeServer/find?text=1900+grantham+road&sourceCountry=&outFields=*&maxLocations=&bbox=&outSR=4326&f=html you have a couple different options to resolve the problem: 1. figure out how to fix the locator itself 2. override the plugin behavior in your leaflet app to just center on the address and a fixed zoom level instead of relying on the extent your service is passing back.
... View more
05-06-2015
03:40 PM
|
0
|
3
|
1771
|
|
POST
|
i've never seen this before, but it looks like the code snippet is attempting to convey how to ensure that the cache property is hydrated and how to clear it. i couldn't give much more insight than that into how exactly it might be used by clientside developers in the context of mutating geometries, perhaps its primary purpose is something internal to the API. in general, property names that begin with an underscore denote that they are 'private', which doesn't mean much in JavaScript other than the fact that the API maintainers don't doc it and that it is subject to change without notice in the future.
... View more
04-02-2015
11:12 AM
|
1
|
0
|
1374
|
|
BLOG
|
i do a lot more tinkering than writing production code, but i uncovered a gem recently that i thought would be helpful for anyone who gets tasked with R&D from time to time. When you're interacting with Esri services that require authentication, you have lots of options. You can use OAuth to ask end users to sign in You can set up a proxy to store credentials safely (so that no one has to) You can leverage an IdentityManager But what about when you just want to see what a service can do? Back in the day we had to walk to school in the snow, uphill, both ways. we started by calling to GenerateToken by hand, then we crafted another request and appended the GUIDy looking strings that came back. Unfortunately, these tokens weren't valid directly in the browser, so we reissued the requests using Fiddler (after making sure to spoof the 'referer'). The good news is, those days are long gone! Now getting a fresh token that can be tacked onto a browser request is a cinch. Just login to http://developers.arcgis.com using your Organizational credentials (or free developer account) and click on the 'Applications' icon in the top righthand corner. If you've already created arcgis.com items for your applications, they'll appear. If you haven't, creating a new registered placeholder app takes less than a minute. Afterward, not only can you retrieve a 'ClientId' and 'ClientSecret' for authenticating on behalf of your end users to consume services that burn credits in the app you're yet to write, but there's also a static token with an incredibly handy copy to clipboard link which can be used temporarily for testing while you're still figuring out exactly what you'd like to do. Create your own, add it to a request like this, and paste into the browser to see how easy it is to start routing http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?token=<paste-yours-here>&stops=-122.4079,37.78356;-122.404,37.782&f=pjson congratulations, you just spent 1/25th of a credit. You know what to do next, go play around with Geoenrichment, (and Elevation, and Routing, and Batch Geocoding and Analysis and on and on) Did i mention that we've also pushed a bunch of great improvements to the documentation on authentication too? Check em out! https://developers.arcgis.com/authentication/
... View more
03-23-2015
05:14 PM
|
1
|
0
|
2719
|
|
POST
|
its definitely a bug. don't quote me, but i heard that basemap handling is improved in 4.x (due out for beta release next month). if you want/need an official tracking number, you'd have to log a ticket with technical support (and reference this thread) so that they can export something public. also, my apologies for never getting back to you on the other DotDensityRenderer thing we chatted about. at first pass looking at your repro case that looked like a bug to me too, but it would be helpful if you could pass it on to tech support as well for them to take a deeper look.
... View more
03-23-2015
10:12 AM
|
0
|
1
|
874
|
|
POST
|
when we tagged Release Candidate 6, we enhanced identify so that individual features in the response would include a new property 'layerId' to explain which layer in the map service the individual feature came from. after you bump the CDN version of esri-leaflet in your sample, you'll be able to access: featureCollection.features.layerId RC6 release notes Release Release Candidate 6 · Esri/esri-leaflet · GitHub the specific Pull Request that introduced the functionality https://github.com/Esri/esri-leaflet/pull/462/
... View more
03-12-2015
01:06 PM
|
1
|
2
|
1456
|
|
POST
|
appreciate the comments and interest. native JS/HTML5 is here to stay (for now anyway)
... View more
02-19-2015
10:50 AM
|
0
|
0
|
2548
|
|
POST
|
will this project be left behind at some point? hi Jason, thats kind of a tough question to answer, as i'm not familiar with too many scenarios when software companies plan proactively to leave a project behind in the future. as far as realism goes, we are actively maintaining the project now and intend to continue (in parallel with the ArcGIS API for JavaScript) as the contributing team feel very strongly that Leaflet is cool and that its valuable to give our customers options. we also take great satisfaction in working out in the open and giving our extended community an opportunity to participate (from API design planning > to extending functionality, working on the website and fixing bugs) see the FAQ below for more info. FAQ · Esri/esri-leaflet Wiki · GitHub
... View more
02-19-2015
09:29 AM
|
2
|
0
|
2548
|
|
POST
|
Tommy, i think i was the only one confused in my last post. despite its appropriate name, i didn't realize that for normally instantiated maps, map.basemapLayerIds returns an array of individual layerIds, and not a basemap title like 'topo' or 'osm'. i'll definitely pass along this feedback to the team.
... View more
02-19-2015
08:46 AM
|
0
|
0
|
2455
|
|
POST
|
Tommy, We're getting into confusing territory here, but in WebmapJSON a single baseMap can be composed of multiple individual basemapLayers (ex: gray basemap + reference labels) that are drawn simultaneously. This means that the baseMap - title tag makes the appropriate equivalent to a basemapLayerId in the map object itself, right? Robert, thanks for chiming in. are you just suggesting that it'd be helpful for the JSAPI to make sure 'title' (if present) is returned by a call to map.getBasemap() or am i missing something else?
... View more
02-19-2015
08:16 AM
|
0
|
5
|
2455
|
|
POST
|
looking at this a little more, i actually can see the logic in how we're doing things now. the Basemap object in the API has both a 'title' and 'id' property. i'd guess we don't use title from the WebMap JSON automatically to set the 'id' in case there are spaces in the name. this makes your workaround seem a pretty sensible approach. all that being said, im happy to dig in deeper if it turns out the current behavior causes deeper underlying problems.
... View more
02-18-2015
03:06 PM
|
0
|
8
|
2455
|
| 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
|