Skip to content

Fix callouts appearing behind markers#1846

Merged
rborn merged 1 commit intoreact-native-maps:masterfrom
olofd:fix_zindex
Jan 11, 2018
Merged

Fix callouts appearing behind markers#1846
rborn merged 1 commit intoreact-native-maps:masterfrom
olofd:fix_zindex

Conversation

@olofd
Copy link
Copy Markdown
Contributor

@olofd olofd commented Dec 3, 2017

For use with tooltip={true}. Ugly, but works.

A bit ugly, but works well.
@Frexuz
Copy link
Copy Markdown

Frexuz commented Dec 4, 2017

+1, tested and works. AirBnB needs to step up! 😠 772 issues and 40 PRs

react-native-maps is the worst-best-package out there

@tpisto
Copy link
Copy Markdown

tpisto commented Dec 8, 2017

I can also confirm that this works!
screen shot 2017-12-08 at 14 57 26

@rborn
Copy link
Copy Markdown
Collaborator

rborn commented Jan 8, 2018

LGTM

@rborn
Copy link
Copy Markdown
Collaborator

rborn commented Jan 8, 2018

@alvelig @christopherdro 🐽

@jbcrestot
Copy link
Copy Markdown

Working here too 👍

capture d ecran 2018-01-11 a 15 45 39

@rborn rborn merged commit 9f592ba into react-native-maps:master Jan 11, 2018
@alvelig
Copy link
Copy Markdown
Contributor

alvelig commented Jan 27, 2018

Experiencing problems with this commit in production when markers are added after callout is open (react-native-maps-super-cluster for example) :(

seems to be fixed with 921fffb

@GarimaMathur07
Copy link
Copy Markdown

@alvelig I have about 600 markers. So, i am using https://github.com/novalabio/react-native-maps-super-cluster uses MapBox's SuperCluster as clustering engine. I am facing Callout behind markers issue. I am using renderMarker as follows:

<ClusteredMapView
			style={styles.map}
			data={this.state.pins}
			ref={o => (this.mapRef = o)}
		        renderMarker={this.renderMarker}
			renderCluster={this.renderCluster}
			fitToElements={ClusteredMapView.ANIMATED_FIT}
			edgePadding={styles.edgePaddingStyle}
			clusteringEnabled={true}
			initialRegion={{
						latitude: this.initialRegionLat,
						longitude: this.initialRegionLong,
						latitudeDelta: this.LATITUDE_DELTA,
						longitudeDelta: this.LONGITUDE_DELTA
					        }}/>

renderMarker (pin) {
	const styles = this.styleSheet();
	return (
		<Marker
			key={pin.id || Math.random()}
			coordinate={pin.location}
			ref={o => (this.marker = o)}
			calloutOffset={{ x: -8, y: 28 }}
			calloutAnchor={{ x: 0.5, y: 0.4 }}
			onCalloutPress={() => this.onPressCallout(pin)}
			image={map_pin.source}
		>
			<Callout tooltip style={styles.customCalloutView}>
				<LocationMarkerCallout title={pin.storeloc.name} description={pin.storeloc.address} />
			</Callout>
		</Marker>
	);
};

Can you please suggest how can i resolve this issue.

pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
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

Successfully merging this pull request may close these issues.

7 participants