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

Added GeoJSON support by default #2959

Merged
merged 6 commits into from
Aug 7, 2019
Merged

Added GeoJSON support by default #2959

merged 6 commits into from
Aug 7, 2019

Conversation

Peretz30
Copy link
Contributor

Does any other open PR do the same thing?

No

What issue is this PR fixing?

None

How did you test this PR?

Tested on Android Real Device

I think that the less dependencies the better and GeoJSON support should be by default in this package.

import React from 'react';
import MapView, {Geojson} from 'react-native-maps';

const alcatraz = {
  type: 'FeatureCollection',
  features: [
    {
      type: 'Feature',
      properties: {},
      geometry: {
        type: 'Point',
        coordinates: [-122.42305755615234, 37.82687023785448],
      }
    }
  ]
};

const Map = props => (
  <MapView>
    <Geojson geojson={alcatraz} />
  </MapView>
);

@rborn
Copy link
Collaborator

rborn commented Jul 11, 2019

@christopherdro @alvelig any thoughts on this?

lib/components/Geojson.js Outdated Show resolved Hide resolved
Copy link
Contributor

@nabati nabati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about GeometryCollection type?

@Peretz30
Copy link
Contributor Author

@nabati are we really need this GeometryCollection type? There are no issues about that in https://github.com/frankrowe/react-native-geojson/issues for 2 years. So, I think wasting time to implement this feature is not worth it.

@alvelig
Copy link
Contributor

alvelig commented Jul 13, 2019

Considering my notes on the uuid use case, LGTM

@Peretz30
Copy link
Contributor Author

Deleted uuid generation, used index instead.

@Peretz30
Copy link
Contributor Author

Peretz30 commented Jul 21, 2019

So, what about to merge?

@alvelig
Copy link
Contributor

alvelig commented Jul 22, 2019

LGTM
@rborn @christopherdro 🐽

@christopherdro
Copy link
Collaborator

LGTM. Could we update the docs and add a basic version in the example app?

@Peretz30
Copy link
Contributor Author

@christopherdro Added geojson description to docs and examples

@Peretz30
Copy link
Contributor Author

Peretz30 commented Aug 5, 2019

@christopherdro @rborn @alvelig Guys, is there anything else I should do?

@christopherdro
Copy link
Collaborator

@Peretz30 Could you address the lint errors show in travis?

@Peretz30
Copy link
Contributor Author

Peretz30 commented Aug 6, 2019

@christopherdro done

@GuillotJessica
Copy link

@Peretz30 will you add bbox feature as it is a common thing on geojson too ? but i don't think your library handles it yet

@Peretz30
Copy link
Contributor Author

Peretz30 commented Aug 6, 2019

@GuillotJessica did you mean getMapBoundaries ? It's method of MapView. Geojson is a component that you should to put inside MapView as shown in example. You can use getMapBoundaries as before.

@christopherdro christopherdro merged commit b781c11 into react-native-maps:master Aug 7, 2019
@GuillotJessica
Copy link

@Peretz30 i meant to display a map regarding the bbox received in a geojson not to get the bbox displayed

@Peretz30
Copy link
Contributor Author

Peretz30 commented Aug 8, 2019

@GuillotJessica I am sorry, but I don't understand what you want to do. Can you, please, provide more details about it?

@GuillotJessica
Copy link

i mean if i provide a geojson with boundingBox, i would like the library mapBoundaries to be set accordingly

@Peretz30
Copy link
Contributor Author

@GuillotJessica How do you want to provide geojson with boundingBox? Can you, please, post your question with some code on StackOverflow

netmaxt3r pushed a commit to netmaxt3r/react-native-maps that referenced this pull request Oct 6, 2019
* commit '3ae31e4a336102538ee422a0d4e71a2ea32647bb': (24 commits)
  [0.26.1] Release
  rn 0.60.5 support (react-native-maps#3020)
  "AIRMap" was not found in the UIManager IN "0.26.0" (react-native-maps#3103)
  [0.26.0] Release
  Add Heatmap back in (react-native-maps#3064)
  Fixes NPE while removing already removed marker. (react-native-maps#3032)
  Add flat property binding on Marker for iOS (react-native-maps#3051)
  Add heading to the onUserLocationChange listener (react-native-maps#3045)
  Add onDoublePress callback (react-native-maps#2937)
  Allow using onPanDrag while scrollEnabled=true (react-native-maps#2935)
  updating pods for compile error (react-native-maps#3011)
  add overlay onPress event (react-native-maps#3007)
  Fix playServicesVersion name in installation docs (react-native-maps#3016)
  Update index.d.ts (react-native-maps#2887)
  Add @ReactModule annotation to help turbomodules processor (react-native-maps#3001)
  Google Maps - Heatmaps for Android and iOS (react-native-maps#2960)
  Added GeoJSON support by default (react-native-maps#2959)
  Update GoogleMaps pos to 3.2.0 (react-native-maps#2999)
  convert to new react native config format (RN 0.60 (react-native-maps#2975)
  fix select annotation when show/hide callout view (react-native-maps#2973)
  ...

# Conflicts:
#	package.json
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.

6 participants