Unable to use `RPopup` with `RLayerCluster`
jdnarvaez opened this issue · 10 comments
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>
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?
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.
@mmomtchev RLayerCluster
renders RFeature
s, 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.
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?
@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 RFeature
s within the cluster. I was asking how one is expected to properly use RLayerCluster
and RPopup
, and if that means providing child RFeature
s that is fine, but I am asking for clarification or an example on it.
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?
@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?
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?
@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?
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.