Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Techn1x/4a47105e0c4f00316f67c95c09657f47 to your computer and use it in GitHub Desktop.
Save Techn1x/4a47105e0c4f00316f67c95c09657f47 to your computer and use it in GitHub Desktop.
geoJSON layer disappears on update
export default Ember.Controller.extend({
lat: -27.5555,
lng: 152.94703,
zoom: 7,
test1:[-27.5555, 152.94703],
test2:[-27.69149, 153.01561],
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
.leaflet-container {
width: 100%;
height: 300px;
font-family: inherit;
}
<h2>Click the button below to trigger the GeoJson prop to get updated</h2>
<p>Notice that even though it is the same valid GeoJSON, it doesn't display</p>
{{#leaflet-map lat=lat lng=lng zoom=zoom}}
{{tile-layer url="http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"}}
{{#marker-layer location=test1}}
{{#tooltip-layer permanent=true}}
hello
{{/tooltip-layer}}
{{/marker-layer}}
{{#marker-layer location=test2}}
{{#tooltip-layer permanent=true}}
hello
{{/tooltip-layer}}
{{/marker-layer}}
{{/leaflet-map}}
{
"version": "0.12.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1",
"ember-leaflet": "3.0.10"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment