1. Walking along the street, I met her.

2. When I was walking along the street, I met her.
3. When I walked along the street, I met her.
* 4. Being walking along the street, I met her.
--------------------------
Does #1 mean #2 or #3? Which one is close to #1? Is #4 ungrammatical? Can we find the explanation in a grammar book?

1, 2, and 3 mean the same thing.

4 is incorrect.
Having "being" and "walking" right next to each other is incorrect, plus it's wordy!

Read up on the use of participles as adverbs.

In the given examples:

1. "Walking along the street, I met her."
2. "When I was walking along the street, I met her."
3. "When I walked along the street, I met her."
4. "Being walking along the street, I met her."

#1, #2, and #3 are all grammatically correct sentences. They have slightly different structures and convey slightly different meanings.

#1 implies that while walking along the street, the speaker happened to meet her. It conveys a sense of simultaneous action.

#2 suggests that the meeting happened in the past while the speaker was walking along the street. The phrase "When I was walking" indicates a specific time frame for the action.

#3 is similar to #2 but is more concise. "When I walked" indicates the past action of walking, implying that the meeting occurred during that time.

Regarding #4, "Being walking along the street, I met her," it is not grammatically correct. The use of "being walking" is not idiomatic in this context. Typically, "being" is not used with an active verb like "walking." Instead, "being" is usually used with a passive verb to indicate a state of being. For example, "Being tired, I decided to take a nap." In this case, it would be more appropriate to say, "While walking along the street, I met her."

While explanation of grammar rules can usually be found in grammar books, specific examples and nuances of meaning may require further analysis and understanding of the language. In this case, comparing the different sentences and their implications would help in understanding the subtle differences in meaning.