0

I want to Create Master Child Polygon and restrict the user to create a child polygon within the master polygon.

I have a master child polygons scenario in my bing map project. I want to show user only the master polygon area to draw the child polygon within the master polygon and not allowed to draw outside the master polygon.

Frits
  • 7,341
  • 10
  • 42
  • 60
  • 3
    Any code that you tried? – Flying Gambit May 23 '17 at 05:39
  • https://stackoverflow.com/a/29915728/7591918 - refer to this, I think that'll help you on your way. All you need to do is check whether the user input lies within your master polygon, and then you can allow the creation of child polygons. – Wep0n May 23 '17 at 05:45

1 Answers1

0

Not 100% clear what you are looking for as drawing could mean to simple load a shape to the map or to draw a shape using a mouse or touch with drawing tools. For the first case you would need to filter out shapes that don't fit inside your polygon which is fairly easy to do using the spatial math module in Bing Maps V8. For the section case, I have put together a code sample: http://bingmapsv8samples.azurewebsites.net/#Restrict%20drawing%20to%20Polygon%20area

rbrundritt
  • 16,570
  • 2
  • 21
  • 46