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

Error while updating property 'coordinates' of a view managed by AIRMapPolyLine #1095

Closed
rajeshkos opened this issue Mar 7, 2017 · 10 comments

Comments

@rajeshkos
Copy link

Hi,

I am getting this error

Error while updating property 'coordinates' of a view managed by AIRMapPolyLine.

When i am creating path on map. In IOS its working fine but in android i am getting this error.

I have already provide the location permission in AndroidManifest.xml file.

Any help ?

@lelandrichardson
Copy link
Collaborator

Please provide more information about the error you are getting, and the current project setup you have

@rajeshkos
Copy link
Author

Hi @lelandrichardson

I am trying to draw path on MAP from one location to another in android. For IOS MapView.Polyline working fine, But for android i am getting this error message : Error while updating property 'coordinates' of a view managed by AIRMapPolyLine.

i have following versions in my package.json file

"react": "15.4.2",
"react-native": "0.41.2",
"react-native-maps": ">=0.12.4",

Kindly Help me

@lelandrichardson
Copy link
Collaborator

@rajeshkos can you provide a stacktrace? The error message is not very helpful.

Also, for RN 0.40+ you will need react-native-maps 0.13+

@rajeshkos
Copy link
Author

rajeshkos commented Mar 28, 2017

@lelandrichardson Thanks for replying.

I want to implement Map in my react native app. For that I have used your plugin and Map work great for bot android and IOS.

When i am using <MapView.Polyline /> , I am able to draw path on IOS device/simulator successfully, but for android i have the above issue. Even simple map is also not opening when <MapView.Polyline /> used.

Code :

<MapView.Polyline
coordinates = {
this.state.coords
}
strokeWidth={3}
strokeColor={"red"}
fillColor="rgba(255,0,0,0.5)"
/>

Do you have any example of polyline drawing for android app ??

@rajeshkos
Copy link
Author

@lelandrichardson I have resolved this issue.. Thanks for you help . 👍

@tanmaybhatt
Copy link

@rajeshkos Can you please tell how did you resolve this issue?

@rajeshkos
Copy link
Author

Hi @tanmaybhatt ,

I had defined coords like this before :

this.state = {
coords : null
}

and it was giving error.

But when i have change it to empty array it worked :

this.state = {
coords : []
}

Hope this helps you too.
👍

@truca
Copy link

truca commented Jan 28, 2018

In my case, the problem was appearing because I was giving it an array intead of an object like this

{
  latitude: -33.4727879,
  longitude: -70.6298313
}

@AndreiCalazans
Copy link

This can also happen if you pass extra data to the Marker. In my case I was passing an object which container latitude, longitude and some other fields.

@AlgorithmeCM
Copy link

You have to pass your coordinates like this:
{{
latitude: -33.4727879,
longitude: -70.6298313
}}

If your coordinates are in a variable named for example myLocation, you have to pass them like this (only one curly bracket):
{
myLocation
}

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

No branches or pull requests

6 participants