You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description
Getting incompatible error on runtime. for styles
ERROR in [default] /.../srcNg/app/map/map-styled.directive.ts:27:19
Argument of type '{ disableDefaultUI: boolean; draggable: boolean; scaleControl: boolean; styles: { "featureType": ...' is not assignable to parameter of type 'MapOptions'.
Types of property 'styles' are incompatible.
Type '{ "featureType": string; "stylers": ({ "hue": string; } | { "saturation": number; } | { "lightnes...' is not assignable to type 'MapTypeStyle[]'.
Type '{ "featureType": string; "stylers": ({ "hue": string; } | { "saturation": number; } | { "lightnes...' is not assignable to type 'MapTypeStyle'.
Property 'elementType' is missing in type '{ "featureType": string; "stylers": ({ "hue": string; } | { "saturation": number; } | { "lightnes...'.
Steps to reproduce and a minimal demo of the problem
Follow these steps, on the style it is giving error on on featureType and elementType, even if we set thous value, it still gives error and if we don't set it, they still give error.
@iBasit you should use the style binding - it's much simpler. But I checked the interface again and noticed that elementType and featureType should be optional. A workaround is to provide 'all' for both values.
Argument of type '{ disableDefaultUI: boolean; scrollwheel: boolean; draggable: boolean; scaleControl: boolean; sty...' is not assignable to parameter of type 'MapOptions'.
Types of property 'styles' are incompatible.
Type '({ "featureType": string; "elementType": string; "stylers": ({ "saturation": string; } | { "light...' is not assignable to type 'MapTypeStyle[]'.
Type '{ "featureType": string; "elementType": string; "stylers": ({ "saturation": string; } | { "lightn...' is not assignable to type 'MapTypeStyle'.
Type '{ "featureType": string; "elementType": string; "stylers": ({ "saturation": string; } | { "lightn...' is not assignable to type 'MapTypeStyle'.
Types of property 'elementType' are incompatible.
Type 'string' is not assignable to type '"all" | "geometry" | "geometry.fill" | "geometry.stroke" | "labels" | "labels.icon" | "labels.tex...'.
Argument of type '{ disableDefaultUI: boolean; scrollwheel: boolean; draggable: boolean; disableDoubleClickZoom: bo...' is not assignable to parameter of type 'MapOptions'. Types of property 'styles' are incompatible. Type '({ stylers: { saturation: number; }[]; } | { featureType: string; elementType: string; stylers: (...' is not assignable to type 'MapTypeStyle[]'. Type '{ stylers: { saturation: number; }[]; } | { featureType: string; elementType: string; stylers: ({...' is not assignable to type 'MapTypeStyle'. Type '{ featureType: string; elementType: string; stylers: ({ lightness: number; } | { visibility: stri...' is not assignable to type 'MapTypeStyle'. Types of property 'elementType' are incompatible. Type 'string' is not assignable to type '"all" | "geometry" | "geometry.fill" | "geometry.stroke" | "labels" | "labels.icon" | "labels.tex...'. m.setOptions(options);
Issue description
Getting incompatible error on runtime. for styles
Steps to reproduce and a minimal demo of the problem
Follow these steps, on the style it is giving error on on
featureType
andelementType
, even if we set thous value, it still gives error and if we don't set it, they still give error.http://playcode.org/angular-2-typescript-google-maps/
What steps should we try in your demo to see the problem?
Current behavior
errors on build
Expected/desired behavior
no errors on runtime
angular2 & angular2-google-maps version
RC5 and 0.13.0
Other information
The text was updated successfully, but these errors were encountered: