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

Fix callouts appearing behind markers #1846

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

olofd
Copy link
Contributor

@olofd olofd commented Dec 3, 2017

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

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

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

tpisto commented Dec 8, 2017

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

@rborn
Copy link
Collaborator

rborn commented Jan 8, 2018

LGTM

@rborn
Copy link
Collaborator

rborn commented Jan 8, 2018

@alvelig @christopherdro 🐽

@jbcrestot
Copy link

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
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

@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.

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