Spatial Data & Mapping


#1

As a mapping and GIS geek attempting to learn Ember, I am curious what solutions you may be using to work with GeoJSON or EsriJSON REST endpoints? In a perfect world, it looks like data could reside in the data store and be displayed with a component.

From what I can glean from reading the API documentation, it appears DS.Transform could be extended to define a custom geometry attribute types so the data would reside in the data store. Granted, this would need to consider the possibility for three different geometries and some way to address spatial reference as well, possibly just initially defaulting to Web Mercator. Also, eventually the issue of spatial indexing may also need to be breached, but this possibly could be accomplished through Terraformer integration.

On the display side, it appears a component wrapping something like Leaflet could work well, but I have yet to sort out how to hook into ensuring the div is loaded into the DOM before kicking off Leaflet to generate the map display. Just this morning I stumbled across Ember.View.didInsertElement, and this appears it may do the trick.

Searching has yet to reveal much going on in this realm. I would love to hear what you have come up with to solve these issues and connect with other like minded people to possibly and hopefully eventually flesh this out.


#2

Perhaps you can try https://github.com/csantero/ember-cli-leaflet


#3

Thanks for the heads up @broerse. I’ll definitely have to take a look and test ember-cli-leaflet.


#4

Sorry it is now called: https://github.com/csantero/ember-cli-ember-leaflet