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

Unable to use RPopup with RLayerCluster #201

Open
jdnarvaez opened this issue Dec 21, 2023 · 10 comments
Open

Unable to use RPopup with RLayerCluster #201

jdnarvaez opened this issue Dec 21, 2023 · 10 comments

Comments

@jdnarvaez
Copy link

I'm seeing the following error

Uncaught Error: An overlay must be part of a location provider (ie RFeature)
    at new ROverlayBase (chunk-456Q432M.js?v=92cd4b4f:43596:13)
    at new RPopup (chunk-456Q432M.js?v=92cd4b4f:43661:5)
    at constructClassInstance (chunk-GSZ7ISAW.js?v=92cd4b4f:10819:26)
    at updateClassComponent (chunk-GSZ7ISAW.js?v=92cd4b4f:14651:13)
    at beginWork (chunk-GSZ7ISAW.js?v=92cd4b4f:15918:22)
    at beginWork$1 (chunk-GSZ7ISAW.js?v=92cd4b4f:19749:22)
    at performUnitOfWork (chunk-GSZ7ISAW.js?v=92cd4b4f:19194:20)
    at workLoopSync (chunk-GSZ7ISAW.js?v=92cd4b4f:19133:13)
    at renderRootSync (chunk-GSZ7ISAW.js?v=92cd4b4f:19112:15)
    at performSyncWorkOnRoot (chunk-GSZ7ISAW.js?v=92cd4b4f:18870:28)

When trying to use a popup with a marker cluster. I probably have the popup in the wrong part of the hierarchy, but moving it into the style render also does not seem to make a difference. Is there a proper example of this?

    <RLayerCluster
      distance={20}
      ref={ref}
      zIndex={1000}
      features={features}
      onClick={onClick}
      key={features.map(f => f.getProperties().id).join('-')}
    >
      <RStyle cacheSize={1024} cacheId={cacheId} render={render} />
      <RPopup ref={popup} trigger={'click'} className="example-overlay">
        <div className="card">
          <p className="card-header">
            <strong>Arc de Triomphe</strong>
          </p>
          <p className="card-body text-center">Popup on click</p>
        </div>
      </RPopup>
    </RLayerCluster>
@mmomtchev
Copy link
Owner

Just as the error message says, your <RPopup> must be a part of a <RFeature>.

As you probably have seen from my profile, I am currently living in total isolation since my last employers organized a very ugly sexual harassment in order to cover up false rape accusation against me organized by another employer with the help of the French police and the French judiciary. All of them are currently extorting me to stop talking about this affair while people post simultaneously issues on my projects. Yours is one of them. Do you have anything to say about this affair?

@mmomtchev
Copy link
Owner

Additionally, I am getting simultaneous WhatsApp messages offering to sell me cocaine bearing a very similar signature to those that were used for the false rape accusations with the French police except that this was more than a decade ago and back then these were SMS messages.

@jdnarvaez
Copy link
Author

jdnarvaez commented Dec 22, 2023

@mmomtchev RLayerCluster renders RFeatures, does it not? What would a proper example be of using a popup within the cluster component?

I have no idea to what you are referring, I was simply posting an issue as I'm looking for an example of proper usage of those two components.

@mmomtchev
Copy link
Owner

So you simply posted an issue asking if the reason for the error message An overlay must be part of a location provider (ie RFeature) was that your RPopup was not part of RFeature and you did simultaneously with someone posting an one-line message that he was using Node.js 14.x for a WASM project that is meant for the browser and which is not compatible with Node.js 14 when unit-testing. Both of your messages were the only ones posted this month, and you accidentally stumbled on an account on which people have been doing this for the last 3 years because of an extortion involving the French police and the French judiciary?

Am I correct @jdnarvaez?

@jdnarvaez
Copy link
Author

@mmomtchev I didn't accidentally stumble upon anything. I have been looking into using OpenLayers for a project, I saw that rlayers was the only React wrapper for it, and have been stubbing out a proof of concept while using it.

I wanted to cluster markers together, tried to follow the examples by using the RPopup component within another component, seeing as RLayerCluster provides the same context and props (minus rFeature)that RFeature does so I figured it should work. It clearly does not. It is unclear how RLayerCluster expects children to be organized in the hierarchy, as the example uses a feature url / formatter directly, instead of providing child RFeatures within the cluster. I was asking how one is expected to properly use RLayerCluster and RPopup, and if that means providing child RFeatures that is fine, but I am asking for clarification or an example on it.

@mmomtchev
Copy link
Owner

And you accidentally posted that response simultaneously with someone putting a single like over one of my tweets? Something that you are not even aware of? Am I still correct @jdnarvaez?

@jdnarvaez
Copy link
Author

@mmomtchev I didn't accidentally do anything

you are erroneously linking this unrelated issue to whatever else is going on.

I simply asked for help with your library and was hoping that the author or someone else on the repo could provide an answer as to how to correctly use the layer cluster with popups. Is that possible for you or some other contributor to provide?

@mmomtchev
Copy link
Owner

Ok, so you simply post simultaneous messages with people involved in this affair, something that has been going on for the last 3 years on this account - while I have been living off social welfare because this is supposed to stop me from talking.

@jdnarvaez, if you were to rate the credibility of your version, on a scale of 1 to 10, how much would you give it?

@jdnarvaez
Copy link
Author

@mmomtchev 10

Any chance you can provide an example bit of code as to how to use the components you or one of the contributors wrote?

@mmomtchev
Copy link
Owner

Normally here they tell you that the judge would probably give it a far lower score, however in my affair there have been judges who think exactly like you - or who used to think this way - because - I hope - now they will come to realize how many people are watching this.

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

No branches or pull requests

2 participants