@andywww wrote:
Hi,
I may be going about this wrong but I’m building a map application that lets the user plan a trip on various levels of granularity. How does one go about rendering the same model results to multiple outlets on ember 3. Is that even the way to do it anymore? All the questions I can find related to this are from 2014 and before.
I am using ember-leaflet and want the maps on one outlet and the details in a sidebar outlet like the attached diagram.
As it currently stands I have something like this as my templates:
Trips (hasMany) Rides (hasMany) Waypoints
Trips route
{{#link-to 'trips'}}Trips{{/link-to}} {{#leaflet-map lat=lat lng=lng zoom=zoom class='map-div'}} {{tile-layer url="https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"}} {{outlet}} // note outlet here {{/leaflet-map}}
Ride route - renders in above outlet
{{#each model.waypoints as |waypoint|}} {{#marker-layer location=waypoint.lnglat draggable=true icon=waypointIcon onDragend=(action 'updateLocation' waypoint)}} {{#popup-layer}} {{waypoint.name}} {{/popup-layer}} {{/marker-layer}} {{/each}}
But I have no idea how to render a text representation of the model data into the sidebar also. Is this even the correct way to do it? Pushing data to application level template?
The sidebar contents will be different each time but the map contents will be cascading based on the level the user is editing at Trips (shows all trips start markers) > Trip (Shows individual trip rides start markers) > Ride (Shows individual ride waypoint markers).
Thanks in advance for any help, i hope I’ve explained myself reasonably well.
Posts: 1
Participants: 1