Open dhirajshinde121083 opened 4 years ago
There's an example further down in the docs showing hot to limit the map extent:
{% block map_options %}
var map_options = {
maxExtend: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
maxResolution: 156543.0339,
numZoomLevels: 20,
units: 'm'
};
{% endblock %}
Yes i know this, this allows us to set boundaries of rectangular shape, what if i want to set polygon shape boundaries, is there a way to restrict user to draw geometry within other polygon bounderies limit
e. g
I have area called "xyz" which is polygon in shape, which lies inside a city called "abc" which is also polygon, so in short i want to draw "xyz" inside "abc", so there will be dropdown in my form which will have city option which contain "abc" as one of the option on select of which it restrict user to draw area of "xyz" on map within "abc" city boundaries.
is it possible ?
There's an example further down in the docs showing hot to limit the map extent:
{% block map_options %} var map_options = { maxExtend: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508), maxResolution: 156543.0339, numZoomLevels: 20, units: 'm' }; {% endblock %} ``` what if i want to set polygon shape boundaries, is there a way to restrict user to draw geometry within other polygon bounderies limit e. g I have area called "xyz" which is polygon in shape, which lies inside a city called "abc" which is also polygon, so in short i want to draw "xyz" inside "abc", so there will be dropdown in my form which will have city option which contain "abc" as one of the option on select of which it restrict user to draw area of "xyz" on map within "abc" city boundaries. is it possible ?
i am trying to draw polygon on using floppy-form map in geodjango is there a way by which i can restrict user to draw polygon in certain restricted area using map_options
in short i want to know how so i set map boundaries extent using JavaScript code for floppy form i know there is option for that in geodjango floppyform : "map_options"
but i don't know how do i set that can someone help me ?