I am developing this tool (Similar tool for the India like ‘State’ and then ‘district’ level) and I am trying different methods so please let me know which method is suitable or not suitable to develop similar tool.

Tool Details:

According to the tool the all data and extent is stored in .json file and its reference given in the zoom_to.js file.

Methods that I am following:

1.Instead of .json file I am storing my data in sql server (where column type is geography so that its storing the extent i.e. xmin,ymin etc.) and then assigning those result to that tool.

2.I am modifying the .json file and replacing the values but getting some errors.

3.Created the two combo-box and assigned for “State” and for “District” respectively but not getting ‘zoom to‘ effect .

So Please let me know whether I am going to correct direction or not

Thanks in advance : )


There are two json files, one for the states, and one for the counties. If you replace these two by by corresponding json files for States of India & Districts in India, It should work.

You have said that you have tried 3 things, but it is not clear where you are facing a problem.

If your data is in MS SQL server, generally you need a service to query the database and return a json file. Since in your case, this data is static, there is no point in querying again and again. You should just create the Json files manually once, and use the static files.

To check the Json file, you can use a JSON validator either online ( like JSONlint) or offline in your text editor(several text editors such as Notepad++ have plugins for this)

Once you have proper Json files, and your tool is configured to access them, it should work. If it does not work, then you'll have to debug using a Javascript debugger like Firebug to diagnose the problem.

| improve this answer | |
  • Thanks a lot Devdatta..I will check above things and let you know : ) thanks once again : ) – Sunil Jan 3 '13 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.