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

Add vector mode support #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sapfear
Copy link

@sapfear sapfear commented Mar 2, 2020

No description provided.

@sapfear
Copy link
Author

sapfear commented Mar 2, 2020

@gribnoysup please review if you can

@mmarkelov
Copy link
Contributor

mmarkelov commented Mar 3, 2020

@sapfear you can define namespace with query:

<YMaps query={{ ns: “ymaps” }} >

@sapfear
Copy link
Author

sapfear commented Mar 3, 2020

@sapfear you can define namespace with query:

yeap, that right. But without it vector mode not starting and will be only logging error in console.
i spend about hour for resolve this case and now using current version of library with

<YMaps query={{ ns: “ymaps” }} >

i think is usefull to force set special namespace

@gribnoysup
Copy link
Owner

gribnoysup commented Mar 3, 2020

Hey @sapfear! First of all, thanks for the contribution!

Can you explain what is the "vector mode" and why it's important to have this specific namespace for it to work? I can't find any documentation for the feature. I'm asking because setting a namespace to something static behind the scenes breaks a few other assumptions that this library makes when loading Yandex.Maps on the page. What if ns is provided in the query additionally to the vector? What if two Provider components with different set of options are on the page, but have vector query param set? All those cases will break the code with even more obscure cases.

If ymaps namespace is required for something not commonly used I would rather document it as a caveats instead of introducing this additional logic

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants