diff --git a/Examples/UIExplorer/MapViewExample.js b/Examples/UIExplorer/MapViewExample.js
index 9a7e2e1aa..863187eda 100644
--- a/Examples/UIExplorer/MapViewExample.js
+++ b/Examples/UIExplorer/MapViewExample.js
@@ -313,6 +313,45 @@ var CustomPinImageMapViewExample = React.createClass({
});
+var CustomOverlayMapViewExample = React.createClass({
+
+ getInitialState() {
+ return {
+ isFirstLoad: true,
+ };
+ },
+
+ render() {
+ if (this.state.isFirstLoad) {
+ var onRegionChangeComplete = (region) => {
+ this.setState({
+ isFirstLoad: false,
+ overlays: [{
+ coordinates:[
+ {latitude: 32.47, longitude: -107.85},
+ {latitude: 45.13, longitude: -94.48},
+ {latitude: 39.27, longitude: -83.25},
+ {latitude: 32.47, longitude: -107.85},
+ ],
+ strokeColor: '#f007',
+ lineWidth: 3,
+ }],
+ });
+ };
+ }
+
+ return (
+
+ );
+ },
+
+});
+
var styles = StyleSheet.create({
map: {
height: 150,
@@ -373,4 +412,10 @@ exports.examples = [
return ;
}
},
+ {
+ title: 'Custom overlay',
+ render() {
+ return ;
+ }
+ },
];
diff --git a/Libraries/Components/MapView/MapView.js b/Libraries/Components/MapView/MapView.js
index b0468e187..9324a2aec 100644
--- a/Libraries/Components/MapView/MapView.js
+++ b/Libraries/Components/MapView/MapView.js
@@ -45,7 +45,6 @@ var MapView = React.createClass({
// TODO: add a base64 (or similar) encoder here
annotation.id = encodeURIComponent(JSON.stringify(annotation));
}
-
return annotation;
});
@@ -54,16 +53,37 @@ var MapView = React.createClass({
});
},
+ checkOverlayIds: function (overlays: Array