{"action":"opened","issue":{"url":"https://api.github.com/repos/bramus/react-native-maps-directions/issues/33","repository_url":"https://api.github.com/repos/bramus/react-native-maps-directions","labels_url":"https://api.github.com/repos/bramus/react-native-maps-directions/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/bramus/react-native-maps-directions/issues/33/comments","events_url":"https://api.github.com/repos/bramus/react-native-maps-directions/issues/33/events","html_url":"https://github.com/bramus/react-native-maps-directions/issues/33","id":310812346,"number":33,"title":"I am using it for direction in my app maps it is working fine in android but not in ios no error got","user":{"login":"erpravin88","id":35656392,"avatar_url":"https://avatars0.githubusercontent.com/u/35656392?v=4","gravatar_id":"","url":"https://api.github.com/users/erpravin88","html_url":"https://github.com/erpravin88","followers_url":"https://api.github.com/users/erpravin88/followers","following_url":"https://api.github.com/users/erpravin88/following{/other_user}","gists_url":"https://api.github.com/users/erpravin88/gists{/gist_id}","starred_url":"https://api.github.com/users/erpravin88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erpravin88/subscriptions","organizations_url":"https://api.github.com/users/erpravin88/orgs","repos_url":"https://api.github.com/users/erpravin88/repos","events_url":"https://api.github.com/users/erpravin88/events{/privacy}","received_events_url":"https://api.github.com/users/erpravin88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-03T12:17:56Z","updated_at":"2018-04-03T12:17:56Z","closed_at":null,"author_association":"NONE","body":"<MapView\r\n              ref={c => this.mapView = c}\r\n              onPress={this.onMapPress}\r\n              onLayout={() => {\r\n                this.layout();\r\n              }}\r\n              style={makpayment.mapview}\r\n              initialRegion={this.state.region}\r\n              onRegionChange={this.onRegionChange}\r\n              showsUserLocation={true}\r\n            >\r\n\r\n              {this.state.accepted.length > 0 &&\r\n                this.state.accepted.map((marker, index) => {\r\n                  if (\r\n                    marker[0].coordinates.latitude &&\r\n                    marker[0].coordinates.longitude &&\r\n                    marker[1].coordinates.latitude &&\r\n                    marker[1].coordinates.longitude\r\n                  ) {\r\n                    if (\r\n                      JSON.stringify(marker[0].coordinates) !==\r\n                      JSON.stringify(this.state.sourceCountry) &&\r\n                      JSON.stringify(marker[0].coordinates) !==\r\n                      JSON.stringify(this.state.destCountry) &&\r\n                      JSON.stringify(marker[1].coordinates) !==\r\n                      JSON.stringify(this.state.sourceCountry) &&\r\n                      JSON.stringify(marker[1].coordinates) !==\r\n                      JSON.stringify(this.state.destCountry)\r\n                    ) {\r\n                      return (\r\n                        <View>\r\n                          <View>\r\n                            <MapView.Marker\r\n                              key={index}\r\n                              coordinate={marker[0].coordinates}\r\n                              title={marker[0].title}\r\n                              description={marker[0].description\r\n                                .split(\"<br/>\")\r\n                                .join(\" , \")}\r\n                              pinColor={settings.MAP_PATH_COLOR.acceptedpin}\r\n                            />\r\n                          </View>\r\n                          <View>\r\n                            <MapView.Marker\r\n                              key={index + 1}\r\n                              coordinate={marker[1].coordinates}\r\n                              title={marker[1].title}\r\n                              description={marker[1].description\r\n                                .split(\"<br/>\")\r\n                                .join(\" , \")}\r\n                              pinColor={settings.MAP_PATH_COLOR.acceptedpin}\r\n                            />\r\n                          </View>\r\n                        </View>\r\n                      );\r\n                    } else {\r\n                      if (\r\n                        JSON.stringify(marker[0].coordinates) !==\r\n                        JSON.stringify(this.state.sourceCountry) &&\r\n                        JSON.stringify(marker[0].coordinates) !==\r\n                        JSON.stringify(this.state.destCountry)\r\n                      ) {\r\n                        return (\r\n                          <View>\r\n                            <MapView.Marker\r\n                              key={index}\r\n                              coordinate={marker[0].coordinates}\r\n                              title={marker[0].title}\r\n                              description={marker[0].description\r\n                                .split(\"<br/>\")\r\n                                .join(\" , \")}\r\n                              pinColor={settings.MAP_PATH_COLOR.acceptedpin}\r\n                            />\r\n                          </View>\r\n                        );\r\n                      }\r\n                      if (\r\n                        JSON.stringify(marker[1].coordinates) !==\r\n                        JSON.stringify(this.state.sourceCountry) &&\r\n                        JSON.stringify(marker[1].coordinates) !==\r\n                        JSON.stringify(this.state.destCountry)\r\n                      ) {\r\n                        return (\r\n                          <View>\r\n                            <MapView.Marker\r\n                              key={index + 1}\r\n                              coordinate={marker[1].coordinates}\r\n                              title={marker[1].title}\r\n                              description={marker[1].description\r\n                                .split(\"<br/>\")\r\n                                .join(\" , \")}\r\n                              pinColor={settings.MAP_PATH_COLOR.acceptedpin}\r\n                            />\r\n                          </View>\r\n                        );\r\n                      }\r\n                    }\r\n                  }\r\n                })}\r\n              {this.state.markers.length > 0 &&\r\n                this.state.markers.map((marker, index) => {\r\n                  if (\r\n                    marker.coordinates.latitude &&\r\n                    marker.coordinates.longitude\r\n                  ) {\r\n                    return (\r\n                      <MapView.Marker\r\n                        key={index}\r\n                        coordinate={marker.coordinates}\r\n                        title={marker.title}\r\n                        description={marker.description\r\n                          .split(\"<br/>\")\r\n                          .join(\" , \")}\r\n                      />\r\n                    );\r\n                  }\r\n                })}\r\n              {this.state.pickCompletedStatus.length > 0 &&\r\n                this.state.pickCompletedStatus.map(value => {\r\n                  if(__DEV__)console.log(\"738  \", value);\r\n                  if (value[0].status === 5) {\r\n                    color = settings.MAP_PATH_COLOR.completed;\r\n                  } else if (value[0].status === 6) {\r\n                    color = settings.MAP_PATH_COLOR.pickup;\r\n                  } else {\r\n                    color = settings.MAP_PATH_COLOR.accepted;\r\n                  }\r\n                  return (\r\n                    <View>\r\n                      <MapViewDirections\r\n                        // origin={value[0][\"coordinates\"]}\r\n                        // destination={value[1][\"coordinates\"]}\r\n                        origin=\"Barstow,california,USA\"\r\n                        destination=\"belle Glade,Florida,USA\"\r\n                        waypoints={(value.length > 2) ? value.slice(1, -1) : null}\r\n                        apikey={settings.GOOGLE_MAPS_APIKEY}\r\n                        strokeWidth={5}\r\n                        strokeColor={color}\r\n                        onStart={(params) => {\r\n                          if (__DEV__)console.log(`Started routing between \"${params.origin}\" and \"${params.destination}\"`);\r\n                        }}\r\n                        onReady={(result) => {\r\n                          this.mapView.fitToCoordinates([\r\n                            this.state.markers[0][\"coordinates\"],\r\n                            this.state.markers[1][\"coordinates\"]\r\n                          ], {\r\n                              edgePadding: {\r\n                                right: parseInt(width / 20),\r\n                                bottom: parseInt(height / 20),\r\n                                left: parseInt(width / 20),\r\n                                top: parseInt(height / 20),\r\n                              }\r\n                            });\r\n                        }}\r\n                        onError={(errorMessage) => {\r\n                          if (__DEV__)console.log('757 GOT AN ERROR', errorMessage);\r\n                        }}\r\n                      />\r\n\r\n                    </View>\r\n                  );\r\n                })}\r\n            </MapView>"}}
{"actor":{"display_login":"erpravin88"}}