Discussion Locked

Automate object labels - graphic format.

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am not a programmer but am working on an idea and need to know if something I have in mind can be done and if so with what level of difficulty. It is not a necessity for the overall concept but would greatly ease some of the work.

This is the situation:

1. An existing map or diagram consists of multiple "cells" - mostly adjacent polygons with lines as their borders. Could be gif, pdf, etc. or something converted from such a format to some other format that would allow what I conceive. A 10x4 arrangement of squares would be a simple example. The source would have to be viewable via browser/Internet

2. The cells have not been in any way named, categorized or indexed. They may be clear of content or not (in no case would the content be in contact with the cell border). It's possible that the content could be changed if necessary to be a different color than the border.

3. I would like to be able to choose a row more or less a straight line) of cells by using a selection tool or by drawing a cursor through them give and then give each a unique label. Ideally the label would start and increment for each cell by a rule that I determine ahead of time (ex: Start:A1, increment:1)

4. The intent is to partially automate the process, so that if I choose a row of 30 cells, starting with A1 and incrementing by 1, that each one will automatically be cataloged with the proper label and location, without me having to enter each one.

5. The labels would identify the location of each cell, such that I would be able to find that cell (highlight it for example) using the label as a pointer.

I know little enough that I have no idea wihether this is a lot to ask or if it is easily accomplished, so please bear with my ignorance. THank you.

6 replies

by toivo talikka

You need to have server side scripting at the back end, for example PHP. The back end application will render the dynamic web page with HTML code and one or more images, plus the polygons breaking down the image(s) into areas.

The HTML code generates the polygons by defining an image map with clickable regions. An example showing clickable circular areas can be found in Dave Raggett's guide at http://www.w3.org/MarkUp/Guide/Advanced.html. You can define . The full syntax details are at http://www.w3schools.com/tags/tag_area.asp.

Instead of you could have the href tag pointing to a PHP routine which keeps track of the areas that have been clicked.

If do not want to have one PHP routine for each element, you can use javascript and define an onmouseover mouse event which stores a value in a hidden field on the form when the cursor passes over a particular area. When the user clicks or doubleclicks, an onclick or ondblclick event can send the form with the hidden field(s) to the server to be processed.

My guess is that even if you simply define one PHP routine for each polygon and then send the whole form back to the browser with one changed area or image, the browser cache mechanism will in the best case only the changed image, not the whole page, from the server.

by donalda-m

The key here is that I want to be able to work with an EXISTING graphic, or a format derived from importing a graphic in a common format (pdf, gif, etc.) and do the process more automatically than the image map process, which at minimum requires one to manually outline or define by coords each active area.

by jaqui

sounds like you are wanting to have an image react like a spreadsheet.

I know that with an open source plaftorm you could integrate a spreadsheet through cgi, but the image tools for any platform don't have this type of capability.

This discussion is closed to new replies.