question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

one we draw polygon on map by dropping points; it results into broking it's shapeliness when points are moved in an uncertain way.

See original GitHub issue

🚨🚨🚨

  • I have tested it on all devices
  • attached code sample, video and screenshot from official document draw tool

🚨🚨🚨


Describe the bug
User drops some point on map. When user drops 3 points I am completing drawing resulting the polygon shape on map. If points are too far away from each other I am adding one sub point into it to help polygon drawing. Some validations are completed by turf. But moving points randomly resulting into broken boundaries. Sometimes just zooming in-out fixes the polygon drawing automatically. How can I fix it.

To Reproduce
I tried same with Mapboxgl-draw tool/doc. here also moving points randomly resulting to some unknown boundaries which is not a part of drawing.

I have attached the code sample.

Example:

removing code as issue has been closed {Its not fixed yet}

Example to call above component: Here newField is just a object which will have polygon coordinate into it when drawing completed.

 <DrawFieldOnMap data={newField} propertyDetail={selectedProperty} fieldListArray={fieldList} />

Expected behaviour
Polygon on map should not broke boundaries or add any predicted colour shape line.

Actual behaviour
Moving points randomly broke the shape-line of polygon but fill layer colour is visible

Screenshots

https://user-images.githubusercontent.com/67738198/151915366-bc666f93-3b0c-4031-a929-5905e7037346.mp4 Screenshot 2022-02-01 at 10 14 14 AM

{the attached screenshot is from mapbox document. In the screenshot check the area annotated with black arrow, there you will find yellowish background without shapeline either it is not part of polygon. Please find the attached video for detaile explanation of issue. }

Versions (please complete the following information):

  • Platform: Android, iOS
  • Device: any device
  • Emulator/ Simulator: yes
  • @react-native-mapbox-gl/maps”: “8.2.0-beta2” (tested with some other versions too but issue exists)
  • React Native Version- 0.63.3

Additional context
Sometimes drawing fixes automatically if user zoom-in/out 2-3 times. Or else if I am doing something wrong please can anybody post similar answer for drawing polygon on map, move it’s point to adjust drawing once completed and editing feature .

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
samiksha-syncommented, Jun 8, 2022

what exactly you want ? you want to create drawing on map or are you looking for this broken boundaries issue fix ?

@SanjanaTailor

0reactions
SanjanaTailorcommented, Jun 9, 2022

what exactly you want ? you want to create drawing on map or are you looking for this broken boundaries issue fix ?

@SanjanaTailor

@samiksha-syn : I am looking for the both things. I am highly dependent on this to implement in React native POC. I saw you have achieved it and there’s nothing wrong if you can connect me or shall I connect with you and where ? It will be more helpful. so that I am replying and tagging you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Draw a large and detailed polygon - Scribble Maps Help Portal
When you're drawing a large and detailed polygon, you might need to move the Map View before you finish drawing the polygon.
Read more >
Polygons | Maps JavaScript API - Google Developers
A polyline is a linear overlay of connected line segments on the map. This class extends MVCObject . When using v=beta , can...
Read more >
How to Drop a Pin on Google Maps From Your Desktop or ...
1. Open the Google Maps app. 2. Find the location on the map where you want to drop the pin, and zoom in...
Read more >
Google Maps API Winding path within polygon with rotate ...
When the polyline reaches the bounds of the polygon, yes, it should follow the shape of the polygon until the next wind if...
Read more >
Fog Revealed: A Guided Tour of How Cops Can Browse Your ...
In Part 1 of our series on Fog Data Science, we saw how when you give some ... through that location data as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found