Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for mapId option.#1086

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jakeFeldman wants to merge1 commit intogoogle-map-react:master
base:master
Choose a base branch
Loading
fromjakeFeldman:add-mapid-support

Conversation

jakeFeldman
Copy link

@jakeFeldmanjakeFeldman commentedJan 9, 2022
edited
Loading

Description

This PR adds support for mapId. By defaultmapId works by adding to the options prop, but we get a warning in the console. This resolves said warning by removing the styles property from the maps option.

I've updated the type defs in the DefinitelyTyped repo as well (PR here)

A Map's styles property cannot be set when a mapId is present.  When a mapId is present Map styles are controlled via the cloud console. Please see documentation at https://developers.google.com/maps/documentation/javascript/styling#cloud_tooling

closes#1070

strarsis and agustingabiola reacted with thumbs up emoji
@jakeFeldman
Copy link
Author

Hello@itsmichaeldiego, I'm reaching out to see if you could take a look at this PR. It's enabling mapId support inside map options. Thanks in advance!

@strarsis
Copy link

strarsis commentedNov 22, 2022
edited
Loading

@jakeFeldman: Awesome! I really need this as I want to use such a map style by map ID!
Edit: Found out by your answer that amapId can already be used (with a JavaScript warning):#1070 (comment)

@strarsis
Copy link

strarsis commentedNov 22, 2022
edited
Loading

@jakeFeldman: Also note that the mapId can only be changed (after it was set) by completely resetting the Google Maps instance (seehttps://stackoverflow.com/a/62947623/4150808).

@humbroll
Copy link

I need this PR as well. I hope it's merged to the main. Is this project not active anymore? It seems like it's been a while since the PR was created.

@jakeFeldman
Copy link
Author

Not too sure. Doesn't seem like its maintained anymore.

@kevin1193
Copy link

Waiting for this to be merged! Would be a good feature.

options = omit(options, ['styles']);
}

console.log('options', options);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should remove this

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@agustingabiolaagustingabiolaagustingabiola left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Provide a way to set map id.
5 participants
@jakeFeldman@strarsis@humbroll@kevin1193@agustingabiola

[8]ページ先頭

©2009-2025 Movatter.jp