GithubHelp home page GithubHelp logo

Comments (3)

JackAtOmenApps avatar JackAtOmenApps commented on June 21, 2024

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 %}

from django-floppyforms.

dhirajshinde121083 avatar dhirajshinde121083 commented on June 21, 2024

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 ?

from django-floppyforms.

dhirajshinde121083 avatar dhirajshinde121083 commented on June 21, 2024

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 ?

from django-floppyforms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.