profile
viewpoint
Patrick Arlt patrickarlt Esri Anaheim CA

Leaflet/Leaflet 29458

:leaves: JavaScript library for mobile-friendly interactive maps

Esri/arcgis-python-api 869

Documentation and samples for ArcGIS API for Python

Esri/arcgis-to-geojson-utils 137

Tools to convert ArcGIS JSON geometries to GeoJSON geometries and vice-versa.

Esri/esri-leaflet-doc 52

Documentation, API Reference and Samples

patrickarlt/acetate 21

A flexible, fast and easy to extend static site generator for Node

patrickarlt/accessible-js-api-app 6

A custom ArcGIS API for JavaScript App focused on accessibility.

odoe/2019-arcgis-presentations 4

2019 Presentations on ArcGIS

jgravois/presentations 3

slides for times i talk in front of people

patrickarlt/Application-Framework 2

A small MVC Sinatra application with MongoID, Redis and AssetPack

startedzorchenhimer/MovieNight

started time in 2 days

created repositoryaaronpk/Personal-IndieAuth-Server

Placeholder repo to collect ideas and issues for the personal indieauth server replacement of indieauth.com

created time in 2 days

startedCOVID19Tracking/website

started time in 2 days

startedmozilla/send

started time in 3 days

startedauto-ssl/lua-resty-auto-ssl

started time in 4 days

issue closedEsri/esri-leaflet

Function Context on Query function

Describe the bug

I cannot currently return features from an intersect query.

Expected behavior

I have a few queries that need to be don't on separate layers each query will take data from the preceding query (ie B query needs data from A query). I would like to be able to get data returned from the query and either store it in a variable within the main function or store in a global variable.

Actual behavior

Currently I cannot get the data hoisted any higher than the callback function level Here is a demo: https://codesandbox.io/s/sweet-knuth-dk3rx?file=/src/index.js

To Reproduce

Open the console and you will see only undefined gets returned.

Environment Information

  • Version of Leaflet (1.7.1`):
  • Version of Esri Leaflet (2.5.1):

closed time in 4 days

lrpatterson

fork a-linko/custom-element-decorators

ES 7 decorators to reduce boilerplate when creating custom HTML elements.

fork in 5 days

issue commentEsri/esri-leaflet

Labels removed when features move outside of view and back.

Sorry I never tested this out again - ended up going a different direction with that project. But when I have time I'll verify the fix. Thanks!

freewheelCarto

comment created time in 5 days

issue commentEsri/esri-leaflet

SubLayers of L.Esri.DynamicMapLayer get recreated and assigned new leaflet id on add/remove

Thanks for your interest and patience! I'd like to dust it off and give it a fresh pair of eyes.

ahalota

comment created time in 6 days

issue commentEsri/esri-leaflet

SubLayers of L.Esri.DynamicMapLayer get recreated and assigned new leaflet id on add/remove

This was a while ago, but I'll see if I can take a look later this week...

On Tue, Nov 17, 2020, 10:34 AM Jacob Wasilkowski notifications@github.com wrote:

@ahalota https://github.com/ahalota do you still find that this statement is still true in the most recent version of esri-leaflet?

This creates a big issue if attempting to attach any handlers to the subLayer, since it is recreated.

If so, can you please create and share a public demo that we can use to investigate and discuss further?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Esri/esri-leaflet/issues/1046#issuecomment-729008921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXLX76CMCE6PE2WLOU4APLSQKJYZANCNFSM4EQBBNHA .

ahalota

comment created time in 6 days

issue commentEsri/esri-leaflet

SubLayers of L.Esri.DynamicMapLayer get recreated and assigned new leaflet id on add/remove

@ahalota do you still find that this statement is still true in the most recent version of esri-leaflet?

This creates a big issue if attempting to attach any handlers to the subLayer, since it is recreated.

If so, can you please create and share a public demo that we can use to investigate and discuss further?

ahalota

comment created time in 6 days

issue closedEsri/esri-leaflet

Support update on pan for FeatureLayer

When panning, new data in the feature layer, edited from other sources, should show up in the layer, much like in the native ESRI webviewer.

closed time in 6 days

peterneubauer

issue commentEsri/esri-leaflet

Support update on pan for FeatureLayer

Closing due to inactivity. Feel free to reopen and discuss again if you'd like.

peterneubauer

comment created time in 6 days

issue closedEsri/esri-leaflet

Fix the flicker when zooming projected dynamic layer

  • Browser and version: Chrome 64

  • Version of Leaflet (L.version): 1.3.1

  • Version of esri Leaflet (L.esri.VERSION): master

When zooming L.esri.dynamicMapLayer, it will disappear for a few milliseconds because of the offset position of the scaled layer was not correctly calculated.

I found some issuses about this

It is better to use L.Proj.ImageOverlay than L.ImageOverlay when creating RasterLayer's image.

Here are the changes I've made:

esri-leaflet v2.1.4 RasterLayer

// to fix dynamiclayer offset (tips: require proj4leaflet before esri-leaflet)
var Overlay = leaflet.Proj ? leaflet.Proj.ImageOverlay : leaflet.ImageOverlay.extend({...});

proj4leaflet v1.0.1

L.Proj.ImageOverlay = L.ImageOverlay.extend({
  //!!! remove initialize
  onAdd: function (map) {
      var ne = map.options.crs.project(this._bounds._northEast),
          sw = map.options.crs.project(this._bounds._southWest);
      this._projectedBounds = L.bounds(L.point(sw.x, ne.y), L.point(ne.x, sw.y));
      L.ImageOverlay.prototype.onAdd.call(this, map);
  },
  ...
});

closed time in 6 days

appleshowc

issue commentEsri/esri-leaflet

Fix the flicker when zooming projected dynamic layer

it probably makes more sense to open a pull request upstream before we take any action.

https://github.com/Esri/esri-leaflet/issues/1085#issuecomment-410057418

Agreed and closing the issue for now. Thanks all.

appleshowc

comment created time in 6 days

issue closedEsri/esri-leaflet

Featuregrid imports `toLatLngBounds` which leaflet exports as `latLngBounds`.

Describe the bug

In the latest version of esri-leaflet, FeatureGrid.js imports toLatLngBounds from leaflet, which is not exported by leaflet 1.6.0. It is exported as latLngBounds. This results in an error in our rollup build. See the following logs:

[!] Error: 'toLatLngBounds' is not exported by node_modules/leaflet/dist/leaflet-src.esm.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureGrid.js (3:2)
1: import {
2:   LatLngBounds,
3:   toLatLngBounds as latLngBounds,
     ^
4:   Layer,
5:   Browser,
Error: 'toLatLngBounds' is not exported by node_modules/leaflet/dist/leaflet-src.esm.js

We temporarly fixed it with an automatic replacement of the codeline after the installation of the npm modules.

Expected behavior

I expect the FeatureGrid.js to import latLngBounds instead of toLatLngBounds. You can see the export of toLatLngBounds as latLngBounds in the leaflet repository.

Environment Information

  • Version of Leaflet (1.6.0):
  • Version of Esri Leaflet (2.4.0):
  • Your OS: [macOS]
  • Browser and Version (error occurs on build time)

Additional context

We are working on an angular component library which is bundled by rollup and built by bazel.

closed time in 6 days

WyssTobi

issue commentEsri/esri-leaflet

Featuregrid imports `toLatLngBounds` which leaflet exports as `latLngBounds`.

Closing due to inactivity.

WyssTobi

comment created time in 6 days

issue closedEsri/esri-leaflet

Best way to set opacity for Feature Layers?

Hello again,

So the application I'm creating allows users to add whatever layers they want to a leaflet map. As such, whatever different types of layers exist, I need to be able to support it. The feature I'm adding is a slider to control the opacity of all the different layers that are on the map. All the other types of layers have an easy to use setOpacity(0.5), however FeatureLayers do not.

What I've been doing has been calling setStyle( { opacity: 0.5, fillOpacity: 0.5 } ). I ran into a problem where new features downloaded wouldn't have the style from esri-leaflet-renderers. I submitted an issue and we worked towards a solution. The solution was good, except for as @kneemer pointed out, it only supports simple renderers. My current "solution" is to call resetStyle() and then setStyle(...) on the load event for the layer. Not ideal, but it works.

Another issue that I noticed was that this didn't set the opacity for points/markers/icons. The documentation for Feature Layer says that setStyle deals with PathOptions, setting either opacity or fillOpacity did nothing.

One idea that I had was to find the graphic/SVG DOM element for the feature layer, and set the opacity on that with CSS styling. Something essentially like this fl.layers['1'].{_icon/_path}.parentElement.style.opacity = 0.5. This worked great, except for the fact that if you add multiple feature layers of the same "type" to the map, they all share the same svg graphic, thus the opacity of one layer affected all the others. A way around this would be instead of calling parentElement, you just iterate through all the _icons/_paths and set opacity on that. That works, except for the performance is really bad, as expected.

Apologies for the rambling, but the tl;dr is what is the best way to set opacity for feature layers, which works on all types. Points/polygons/lines, simple/complex renderers. Could there be a setOpacity(0.5) like all the other esri-leaflet layers?

closed time in 6 days

daniel-sabourin

issue commentEsri/esri-leaflet

Best way to set opacity for Feature Layers?

Closing as this is now in "FAQ" status with ideas discussed above for posterity.

daniel-sabourin

comment created time in 6 days

issue closedEsri/esri-leaflet

Labels removed when features move outside of view and back.

Using the code given for the Labeling Features example (and in the example itself), labels are sometimes removed when the features move out of the viewport and back in.

It seems related to the removefeature events. In some cases (but not always), when the features move out of the viewport, I was able to see that the removefeature event is fired (related to this functionality?). In the example code, the labels are removed from the map on this event. I do see that addfeature is fired when the map is panned and features make it back into view, but it doesn't add the labels.

I'm trying to figure out a solution for my current project. If I can figure something out, it will probably be more of a work around than a permanent solution. Maybe someone will be able to address this in a more permanent way for the example on the Esri Leaflet docs.

Here is a screenshot from the Esri Leaflet example page that shows missing labels.

image

closed time in 6 days

freewheelCarto

issue commentEsri/esri-leaflet

Labels removed when features move outside of view and back.

Closing. Believe to have been fixed in the release of v2.4.0.

freewheelCarto

comment created time in 6 days

issue commentEsri/esri-leaflet

"Powered by Esri" Map Attribution doesn't go away when you run Map.removeLayer(...) on an esri-leaflet map

Thanks for the additional info but a live public demo would be extremely useful and helpful. If not JSBin, perhaps you could us https://codesandbox.io or https://codepen.io/pen/ or provide a full html/js/css code sample re-using some public layer resources available at the demo pages https://esri.github.io/esri-leaflet/examples/?

timothycouchhsi

comment created time in 6 days

issue closedEsri/esri-leaflet

Partial Drawing of dynamicMapLayer in Safari

Describe the bug

I have a list of layers that users can turn on and off at will, a user is reporting that they are only ever able to see half of a certain layer drawing when turned on. This is the layer in question: https://location.cabarruscounty.us/arcgisservices/rest/services/DataExplorerDatasets/MapServer/1.

When the user pans or zooms half of the screen updates while the other half remains undrawn. I have map.invalidateSize setup to refresh when user resizes the screen and what not but seems that the drawing issue persists and only does so in Safari version 13.1. All other browsers seem to be fine as I cannot reproduce the issue

Screenshots

image image

Environment Information

  • Version of Leaflet (L.version): 1.6.0

  • Version of Esri Leaflet (L.esri.VERSION): 2.4.1

  • Browser and Version: Safari 13.1

Additional context

Also be aware that the layer in question is an annotation layer.

closed time in 11 days

lrpatterson

created repositoryaaronpk/atem-tally-controller

created time in 11 days

issue commentEsri/esri-leaflet

Support Modern (ES6+) JavaScript

Related to all this: the latest standard, and thus semistandard which we use, has set to give a warning if your project uses var. https://github.com/standard/standard/issues/633#issuecomment-719874016 So we either need to switch to let instead of var, or be limited to a non-latest version of standard/semistandard.

gavinr

comment created time in 11 days

issue commentEsri/esri-leaflet

Function Context on Query function

var inter = await query.intersects(l);

methods like Query.intersects() do not return a Promise so the await keyword you're inserting is ignored. as you said, results fetched in asynchronous tasks in Esri Leaflet are made available via callbacks.

i'm hopeful that the page below (particularly the section titled 'Keep your code shallow') might help you pass around the information you're fetching asynchronously and accessing via callbacks.

http://callbackhell.com

lrpatterson

comment created time in 12 days

issue openedEsri/esri-leaflet

Function Context on Query function

Describe the bug

I cannot currently return query features from an intersect query.

Expected behavior

I have a few queries that need to be don't on separate layers each query will take data from the preceding query (ie B query needs data from A query). I would like to be able to get data returned from the query and either store it in a variable within the main function or store in a global variable.

Actual behavior

Currently I cannot get the data hoisted any higher than the callback function level Here is a demo: https://codesandbox.io/s/sweet-knuth-dk3rx?file=/src/index.js

To Reproduce

Open the console and you will see only undefined gets returned.

Environment Information

  • Version of Leaflet (1.7.1`):
  • Version of Esri Leaflet (2.5.1):

created time in 13 days

issue commentEsri/esri-leaflet

"Powered by Esri" Map Attribution doesn't go away when you run Map.removeLayer(...) on an esri-leaflet map

I'm using a dynamicMapLayer and a tiledMapLayer for base layers. Sorry, but I don't have a jsbin to show. Thank you for checking this out!

timothycouchhsi

comment created time in 17 days

issue commentEsri/esri-leaflet

"Powered by Esri" Map Attribution doesn't go away when you run Map.removeLayer(...) on an esri-leaflet map

Hi, thanks for posting this issue. What kind of layer are you seeing this behavior with (Basemap Layer, Feature Layer, etc)?

Do you have a jsbin that demonstrates the issue?

Thanks!

timothycouchhsi

comment created time in 17 days

more