Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

MapStyle incompatable error for MapOptions #617

@iBasit

Description

@iBasit

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.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions