Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4834

Emberjs leaflet - object as parameter

$
0
0

@blinker8 wrote:

Hello, I am new to emberjs and am creating an emberjs-leaflet and emberjs-leaflet-draw application as frontend to an api.

I have this code to init the map in the template

{{#leaflet-map lat=lat lng=lng zoom=zoom}} {{tile-layer url=“http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png”}} {{draw-control draw=draw}} {{/leaflet-map}}

and i want to pass to draw an object of options so i use this controller

import Controller from ‘@ember/controller’;

export default Controller.extend({ lat: 45.519743, lng: -122.680522, zoom: 10, draw: { polyline: false, circle: false, rectangle: false, marker: false }, });

but i get an error

error Only string, number, symbol, boolean, null, undefined, and function are allowed as default properties ember/avoid-leaking-state-in-ember-objects

How can i pass such options or even more compicated ones?

Sadly the documentation and demos links for https://www.npmjs.com/package/ember-leaflet-draw do not work.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4834

Trending Articles