google maps api 3 - What is wrong in this Polygon in MYSQL 5.7.19? -
so, trying save polygon in mysql using geospatial functions... found several examples online following:
select st_geomfromtext('polygon(( 13.517837674890684 76.453857421875, 13.838079936422464 77.750244140625, 14.517837674890684 79.453857421875, 13.517837674890684 76.453857421875, 13.517837674890684 76.453857421875 ))'); select st_geomfromtext('polygon(( -98.07697478272888 30.123832577126326, -98.07697478272888 30.535734310413392, -97.48302581787107 30.535734310413392, -97.48302581787107 30.123832577126326, -98.07697478272888 30.123832577126326 ))')
the problem when tried make own, returns following error: error code: 3037. invalid gis data provided function st_geometryfromtext.
this code used...
select st_geomfromtext('polygon(( -99.16939973831177 19.42468828496807, -99.16710376739502 19.424607339789876, -99.16712522506714 19.422907481732416, -99.168541431427 19.421996836172347, -99.16989326477051 19.422947954749972 ))');
these longitude-latitude pairs, think has order current order consecutive.
can give me hint, please?
thank you
edit: mention in comments section, definition polygon must closed.
i using google maps javascript api v3 draw polygon , using "overlaycomplete" event listener fires function when polygon closes. function fires print coordinates given api.
if polygon must close exactly, why api not giving exact coordinates? there work around?
the polygon should close way
select st_geomfromtext('polygon(( -99.16939973831177 19.42468828496807, -99.16710376739502 19.424607339789876, -99.16712522506714 19.422907481732416, -99.168541431427 19.421996836172347, -99.16989326477051 19.422947954749972, -99.16939973831177 19.42468828496807 ))');
wiki
Comments
Post a Comment