Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapTypeControlOptions with style HORIZONTAL_BAR shows the style of DROPDOWN_MENU #1688

Closed
jimmykane opened this issue Jul 16, 2019 · 3 comments

Comments

@jimmykane
Copy link

Example

public mapTypeControlOptions: MapTypeControlOptions = {
// mapTypeIds: [MapTypeId.HYBRID, MapTypeId.ROADMAP, MapTypeId.SATELLITE, MapTypeId.TERRAIN],
mapTypeIds: ['hybrid', 'roadmap', 'satellite', 'terrain'],
position: ControlPosition.LEFT_TOP,
style: MapTypeControlStyle.DROPDOWN_MENU
};

Produces

Screenshot 2019-07-16 at 18 35 56

And

 public mapTypeControlOptions: MapTypeControlOptions = {
    // mapTypeIds: [MapTypeId.HYBRID, MapTypeId.ROADMAP, MapTypeId.SATELLITE, MapTypeId.TERRAIN],
    mapTypeIds: ['hybrid', 'roadmap', 'satellite', 'terrain'],
    position: ControlPosition.LEFT_TOP,
    style: MapTypeControlStyle.HORIZONTAL_BAR
  };

produces

Screenshot 2019-07-16 at 18 36 33

Unless I dont understand well this looks like a bug

@ghost
Copy link

ghost commented Jul 18, 2019

Yes, it's a bug. MapTypeControlOptions#style is an enum, however their values are auto generated and not necessarily match google's MapTypeControlOptions enum values.

@DefJunx
Copy link
Contributor

DefJunx commented Sep 26, 2019

Hi, can I take a shot at this?

DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Sep 26, 2019
- Fixed the values for the enum MapTypeControlStyle to match Google Enum
@DefJunx
Copy link
Contributor

DefJunx commented Sep 26, 2019

I've created PR #1737 . Sorry if I didn't wait for your answer but I was eager to help after using this package for so long (for once I could actually do something which is inside my "skill pool").

DefJunx pushed a commit to DefJunx/angular-google-maps that referenced this issue Sep 27, 2019
@ghost ghost closed this as completed in 8abe038 Sep 29, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants