×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Adding polygon and json fields to save
Phil
New Member
Posts: 2
2 năm 5 tháng trước #9928
bởi Phil
Adding polygon and json fields to save was created by Phil
I have several components working but we're finding one component needs to be updated. This requires adding two fields, type of 'polygon' and a type JSON
The way it would work is:
I need to catch/modify the save (#6) so I can unpack the JSON string, put the points together into something like this:
`
When the model returns the data, it only needs to return the JSON into a hidden form var. If it exists, I'll unpack that and redraw the polygon on the map. I think I have this figured out but not 100% certain.
I've figured out how to upgrade the table. That's not a problem.
So my questions are:
Thanks!
The way it would work is:
- The view outputs the form and a google map (working)
- The user fills in the form and draws a polygon on that map (working)
- The polygon points (latitudes and longitudes) are stored in a hidden form as a JSON string (easy enough)
- The user clicks save
- The form is validated
- The save occurs
I need to catch/modify the save (#6) so I can unpack the JSON string, put the points together into something like this:
`
``ST_GEOMFROMTEXT( 'POLYGON( (48.89 2.27, 48.89 2.42, 48.81 2.42, 48.81 2.27, 48.89 2.27) )' ) `
When the model returns the data, it only needs to return the JSON into a hidden form var. If it exists, I'll unpack that and redraw the polygon on the map. I think I have this figured out but not 100% certain.
I've figured out how to upgrade the table. That's not a problem.
So my questions are:
- How/where do I modify the component to add the json field so that it saves?
- How/where do I intercept the save process so that I can extract the JSON points and create the POLYGON entry?
Thanks!
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Louis C. Boggs
New Member
Posts: 2
2 năm 4 tháng trước - 2 năm 4 tháng trước #9946
bởi Louis C. Boggs
Replied by Louis C. Boggs on topic Adding polygon and json fields to save
Last edit: 2 năm 4 tháng trước by Louis C. Boggs.
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Louis C. Boggs
New Member
Posts: 2
2 năm 4 tháng trước #9947
bởi Louis C. Boggs
Replied by Louis C. Boggs on topic Adding polygon and json fields to save
Thank yo for sharing the Info, I will try to figure it out more!
OneVanilla
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Elda
New Member
Posts: 1
2 năm 4 tháng trước - 2 năm 3 tháng trước #9948
bởi Elda
Replied by Elda on topic Adding polygon and json fields to save
Last edit: 2 năm 3 tháng trước by Elda .
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
blacksmith
New Member
Posts: 1
1 năm 10 tháng trước #9976
bởi blacksmith
Replied by blacksmith on topic Adding polygon and json fields to save
<a href="livetheorangelife.info/">Live The Orange Life
<a href="walmartone.tech/">Walmart One Login – Guide For Active & Displaced Walmart Associates
<a href="www.myaccountaccess.me/">myaccountaccess/activate
<a href="www.onevanilla.onl/">One Vanilla
<a href="jcpassociatekiosk.info/jcpenney-associates-kiosk/">JCP Associate Kiosk
<a href="walmartone.tech/">Walmart One Login – Guide For Active & Displaced Walmart Associates
<a href="www.myaccountaccess.me/">myaccountaccess/activate
<a href="www.onevanilla.onl/">One Vanilla
<a href="jcpassociatekiosk.info/jcpenney-associates-kiosk/">JCP Associate Kiosk
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Thời gian tải trang: 0.170 giây