Estoy intentando actualizar una aplicación que creé con esri-leaflet y esri-leaflet-related. <\/SPAN><\/P>Basado en lo que he leído en las notas de las versiones tanto de esri-leaflet como de esri-leaflet-related.<\/SPAN><\/P> <\/P>He actualizado mi aplicación para apuntar a las versiones cdn de (ver abajo):<\/SPAN><\/P> <\/P>leaflet: versión 0.7.3<\/P>esri-leaflet: versión 1.0..0<\/P>esri-leaflet-related: versión 1.0.2<\/P> <\/P><script src="\/\/cdn.jsdelivr.net\/leaflet\/0.7.3\/leaflet.js"><\/script><\/P><script src="\/\/cdn.jsdelivr.net\/leaflet.esri\/1.0.0\/esri-leaflet.js"><\/script><\/P><script src="\/\/cdn.jsdelivr.net\/leaflet.esri.related\/1.0.2\/esri-leaflet-related.js"><\/script><\/P> <\/P>pero estoy obteniendo el siguiente error:<\/P> <\/P>TypeError: a no está definido<\/P>http:\/\/cdn.jsdelivr.net\/leaflet.esri\/1.0.0\/esri-leaflet.js<\/A><\/P> Línea 20<\/P> <\/P>Nota: Estoy haciendo clic en un botón que dispara lo siguiente (script parcial):<\/P> <\/P>$('#NSM').click(function(){<\/P>buttonPicked = 'NSM';<\/P>buttonType = document.getElementById('NSM');<\/P> <\/P>var query = L.esri.Tasks.query(tableURL).where("type like '" + buttonType.value + "'");<\/P>var rquery = L.esri.Tasks.queryRelated(tableURL).relationshipId("0");<\/P>query.ids(function(error, ids, response)<\/P>{ ......<\/P> <\/P>Cualquier idea sobre lo que está pasando sería apreciada<\/P>Saludos<\/P>Chris<\/P>P.D. Por favor, hágamelo saber si necesita una copia de mi script subido<\/P>
Línea 20<\/P>
<\/P>
Nota: Estoy haciendo clic en un botón que dispara lo siguiente (script parcial):<\/P>
$('#NSM').click(function(){<\/P>
buttonPicked = 'NSM';<\/P>
buttonType = document.getElementById('NSM');<\/P>
var query = L.esri.Tasks.query(tableURL).where("type like '" + buttonType.value + "'");<\/P>
var rquery = L.esri.Tasks.queryRelated(tableURL).relationshipId("0");<\/P>
query.ids(function(error, ids, response)<\/P>
{ ......<\/P>
Cualquier idea sobre lo que está pasando sería apreciada<\/P>
Saludos<\/P>
Chris<\/P>
P.D. Por favor, hágamelo saber si necesita una copia de mi script subido<\/P>
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.
Thanks John!!
I re-read the documentation after reading your reply and everything is working again
Chris
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.