Hi there,
happens that I need to integrate a Google map as a component so I asked Google and it came up with a solution like this
export default Ember.Component.extend({
insertMap: function() {
var container = this.$('.map-canvas')[0];
var options = {
center: new window.google.maps.LatLng(
this.get('latitude'),
this.get('longitude')
),
zoom: this.get('zoom')
};
var map = new window.google.maps.Map(container, options);
}.on('didInsertElement')
});
Now I need to add some placemarks and that’s why I wanted to know if nested components are possible with Ember?
{{#google-map latitude="54.18" longitude="12.09" zoom=12}}
{{google-placemark title="One" lat=54.16 lon=12.05}}
{{google-placemark title="Two" lat=54.18 lon=12.09}}
{{/google-map}}
If so, can someone describe, how I need to code the map component to know about the placemarks.
Regards, Martin