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

Add suport for KML file (Only Markers) #2011

Merged
merged 16 commits into from
Feb 23, 2018

Conversation

rafaellincoln
Copy link
Contributor

Adds support for make marker with KML files.
Discussion on implementation at #967

example/App.js Outdated
@@ -142,7 +143,7 @@ class App extends React.Component {
[DefaultMarkers, 'Default Markers', true],
[CustomMarkers, 'Custom Markers', true],
[TakeSnapshot, 'Take Snapshot', true, '(incomplete)'],
[CachedMap, 'Cached Map'],
[CachedMap, 'Cached Map', true],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Returned to old value

@@ -22,7 +22,7 @@
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBAefhRlXEH3vCko-zZTX6PHllTR6av4WI"/>
android:value="AIzaSyAJVwyHn6klk0_aoEL1oEysTOYn0jrRU1c"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why? )) Does the old key work, doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Returned to old value

@@ -18,4 +18,5 @@ Pod::Spec.new do |s|

s.dependency 'React'
s.dependency 'GoogleMaps', '2.5.0'
s.dependency 'Google-Maps-iOS-Utils', '2.1.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you need it for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need it to convert the kml tags to Object

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see now :)

 +#import "GMUKMLParser.h"
 +#import "GMUPlacemark.h"
 +#import "GMUPoint.h"
 +#import "GMUGeometryRenderer.h"

@alvelig
Copy link
Contributor

alvelig commented Feb 2, 2018

Great! Thank you for the contribution!!! LGTM

@rborn @christopherdro 🐽

Copy link
Collaborator

@rborn rborn left a comment

Choose a reason for hiding this comment

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

Other than the docs comment, LGTM

docs/mapview.md Outdated
@@ -35,6 +35,7 @@
| `loadingBackgroundColor` | `Color` | `#FFFFFF` | Sets loading background color, default to `#FFFFFF`.
| `moveOnMarkerPress` | `Boolean` | `true` | `Android only` If `false` the map won't move when a marker is pressed.
| `legalLabelInsets` | `EdgeInsets` | | If set, changes the position of the "Legal" label link from the OS default. **Note:** iOS only.
| `kmlSrc` | `string` | | The URL from KML file. **Note:** Google Maps only (either Android or iOS with `PROVIDER_GOOGLE`).
Copy link
Collaborator

Choose a reason for hiding this comment

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

You say in the PR that it's markers only maybe we should specify this in the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Docs updated.

@rborn
Copy link
Collaborator

rborn commented Feb 20, 2018

@rafaellincoln could you please fix the conflicts and #2011 (comment) 🤗

@rafaellincoln
Copy link
Contributor Author

rafaellincoln commented Feb 23, 2018

@rborn Fixed conflicts

@pedrolopes10
Copy link

Hi there, @rafaellincoln thanks for this functionality! I've run the example that's in the docs (MapKml.js) but I can only see the markers running it on Android Studio, when running it on Genymotion it doesn't show nothing. @rborn can you confirm it?

Also, it says (only markers) why? It works great with lines (LinearRing)!

Thanks!

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.

4 participants