ng2-ui / map

Angular Google Maps Directives
https://ng2-ui.github.io/map
260 stars 98 forks source link

Circle directive breaks circle svg tag, need to NS your directives #272

Open InsOpDe opened 6 years ago

InsOpDe commented 6 years ago

IMPORTANT

ERROR Error: StaticInjectorError(AppModule)[Circle -> NguiMapComponent]: StaticInjectorError(Platform: core)[Circle -> NguiMapComponent]: NullInjectorError: No provider for NguiMapComponent!

Steps to reproduce and a minimal demo demo

Current behavior

Expected/desired behavior

Other information

cemarte commented 6 years ago

Any workaround for this issue? Mine was using NgNonBindable directive in the svg element, but it won't allow you to bind data to any child element.

t-zander commented 6 years ago

It also happens with polygon tag

allenhwkim commented 6 years ago

Please use ngNonBindable

<ngui-map zoom="5" center="24.886, -70.268" scrollwheel="false">
      <map-polygon [editable]="true"
        [paths]="paths"
        [strokeColor]="'#FFC107'"
        [strokeOpacity]="0.8"
        [strokeWeight]="2"
        [fillColor]="'#FFC107'"
        [fillOpacity]="0.35"></map-polygon>
</ngui-map>
<svg ngNonBindable viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <circle cx="50" cy="50" r="10"/>
</svg>