S
S
Sergey Alpeev2014-08-07 11:57:58
PHP
Sergey Alpeev, 2014-08-07 11:57:58

How to implement a filter by metro stations in the form of a map in modx revo?

Good afternoon, please tell me how you can get metro stations from resources and show them on the drawn map in the form of disguised checkboxes, and then filter them? an example here is www.4estate.ru , you need to press select in the filters near "Metro"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petrov, 2014-08-07
@QTnub

The question is a little unclear.
1. Any transport scheme is a previously known structure. Something like this:

{
  Линия_метро_1: {
    Станция_метро_1: {
      Имя: '',
      ...
    },
    Станция_метро_2: {
      Имя: '',
      ...
    },
    ...
  },
  Линия_метро_2: {
    Станция_метро_1: {
      Имя: '',
      ...
    },
    Станция_метро_2: {
      Имя: '',
      ...
    },
    ...
  },
  ...
}

With other transport, everything is also clear - only instead of metro lines there will be route numbers, and metro stations will be replaced with stops.
2. Having processed such a scheme, we form groups of checkboxes (+ label) and (if necessary) additional html elements (svg is also possible). Styles are written separately, based on the layout of the interface.
3. Clicking on the label causes the flag status to change and the corresponding visual representation of this element and its associated additional element (if one has been created).
4. Clicking on the flag corresponding to the group does the same operation, but with each flag from the group. You can simply call a click on all the checkboxes in the group.
Something like this codepen.io/cleric/pen/aBkrl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question