I am preparing a D&D campaign for a group of 4 PCs and in one part of the campaign, there is a possibility that they may fight against the local guards in the streets of a city. I can draw a tactical map for a fight in a dungeon or a manor, these are small environments enough to draw. The problem is I can't draw all of the city on a tactical map, obviously. And I don't want to limit my player like "oh you can't go that way because there is no tactical map for "there". So how can I draw tactical maps for fights happens in streets of a city or is there any other solution for this issue?
Draw up a number of city map sections as geomorphic map tiles. Lay out a few tiles as a starting area and then, when the PCs get close to the edge of that area, grab another tile and use it to extend the map in the appropriate direction. If necessary, tiles can also be reclaimed from areas which have been left behind and reused.
In the event of an extended chase in which you want to continue using the regular tactical rules throughout, this technique can be used to produce a "rolling map" of arbitrarily large size in whatever direction the chase leads. (Just remember to keep notes on which tiles were used where if there's a chance of characters doubling back or revisiting areas later, unless your players aren't concerned with that kind of consistency.)
We used to use books. You probably have quite a few of them nearby your gaming space.Paperbacks are good for small building size and can be laid out in rows and columns so that the spaces between them indicate streets and alleys. You can build a large section of urban environment in a matter of minutes. Stack books to make taller buildings. You can set miniatures on top to indicate people on rooftops, and it gives you an excellent idea of what their line of sight might be (in the event they are snipers).
If you stack them on your normal play surface, where you draw your dungeon maps, you can quickly doodle in things like rain barrels, carts, streams, etc. You can also draw a doorstep symbol in front of any book stack to indicate entrances. If you quickly trace around any stack, you can easily lift aside the books to reveal the "interior" of the building.
I used to use this far more often in superhero genre games, which frequently have urban encounters, but the principle is sound for fantasy as well.
Hand draw them as they go (very roughly). If you're concerned about squares, use graph paper or a photocopied blank sheet. Keep things flowing and grants complete freedom of the area, with the option to go backwards.
Edit: This solves your problem by allowing your party to go anywhere. Because you can draw the next map section in ~15s, when combined with an optional larger map of the area it means your party can play exactly how they want to without you being concerned about them going off map. It's not as pretty as a map you've spent time on but I think it's better than artificially restricting players. Additional advantage - you only create what you need.
For maps or text that shall go on and on, there is "endless printer paper" (which is or was often used in telefax machines). That are paper sheets connected to each other. If you can't get a hold of that, there is paper on rolls, like the stuff from IKEA. Roll it out on the table (possibly prepare it with a grid) and then move down the line as you progress, sketching down the streets. If they make a corner and reach a side, draw a thick double line at that edge and continiue in the center, best even connect which 'square' on the street going away is which one on the one starting. Like this:
From my experience in D&D 4e where I have done most of my city encounters on a tactical map, players don't often stray from it. Here is why
It is not advantageous for them to take the fight across the entire city
This will only get more guards involved, remembering that the force is much larger than the five or so guys in the encounter. This information may be hard to convey, but a few clever skill checks might let the players know the size of the force or that the guards have to patrol a certain area, and reinforcements only come form that area. Maybe if they keep it quick and local no one will find out about the fight.
Your city guard should be trying to contain them in one small area.
This is so they can subdue them while limiting the possibility of escape. It is a modern riot tactic, but a fairly logical leap to make in a fantasy world. Maybe even adapted because your guard were trained at the local garrison and learnt it as a battlefield tactic (pinning an enemy against the banks of a river). Another reason to do this is to avoid damage to local shop fronts. (A wizard missing with a fire ball near your alchemist shop leads to some hilarity though)
You can give reasons as why not to leave the map.
Create soft barriers or focal points that the players won't want to give up. It won't be as immersion breaking as saying no you can't go that way because there is no map for it. A couple of examples to this may be:
A crowd has gathered around being drawn at first by shouts, and then by an ever enlarging crowd. This is the best action they've seen in a while, since the last hanging was a month ago. If you try to escape they shove you back in wanting to see who wins
As the city guard approach, you notice a strange glyph appear on the cobblestones beneath your feet. If you get chased off, or captured your not sure you could find this particular ally again without some difficulty
Finally if they do decide to leave the map, let it break down to a story time chase. Bonus here is trying to use powers or abilities meant for combat outside of it. I once had a ranger use a daily that shot multiple arrows to form a impromptu set of stairs to get onto a roof. The action in that sequence moved very quickly, and was enjoyed by all the players. Then they could either escape or you could come to another significant location and have another map ready for that in a different part of the city so they don't need to connect or run into one another.