- Wplace Blog
- How to Search Individual Pixels or Cities in Wplace live
How to Search Individual Pixels or Cities in Wplace live
How to Search Pixels or Cities
Finding one exact spot on a big map is hard. Scrolling around is slow. A search bar fixes that. You type a city or a precise target. The map jumps there. Simple.
Try it now: Open the WPLACE Geocode tool
Here’s the goal: one input that understands two kinds of things:
- City/place names (like “Berlin” or “New York”)
- Precise targets (coordinates or a map “pixel” at a given zoom)
When people say “pixel,” they often mean the smallest visible square at the current zoom. On web maps, that usually means a tile at zoom Z with indices X and Y. So we support both “human” and “power user” input in one place.
Why this matters
- Precision: Go to the exact spot you want.
- Speed: Stop panning for minutes.
- Shareable: Copy a clean link with lat, lng, and zoom.
- Accessible: Works well on small screens and touch devices.
What “pixel search” means here
- For most people, “pixel” means the smallest square you can click at your current zoom.
- On the technical side, that is a tile with coordinates Z/X/Y.
- We let you type either a city, a pair of coordinates, or a tile reference.
- The map centers on that target. The zoom updates as needed.
One input, clear rules
Use one search box. It accepts three simple kinds of input:
- City/place: “Osaka”, “New York”, “São Paulo”
- Coordinates: “40.7128, -74.0060”
- Tile reference: “13/2411/3081” or “z=13 x=2411 y=3081”
Here’s how it works:
- If you type a place, we use a geocoding service to get lat/lng.
- If you type numbers like “lat, lng,” we skip geocoding and jump there.
- If you type a tile, we convert Z/X/Y to a lat/lng center and move the map.
Examples
- “Berlin” → centers on Berlin at a sensible zoom (for example, 12–13).
- “37.7749, -122.4194” → centers on San Francisco at your chosen zoom.
- “13/2411/3081” → centers on the middle of that tile at zoom 13.
Tip: Add a zoom if you like. For example, “Berlin zoom 14” or “37.7749, -122.4194 zoom 16”. Plain English is fine. We look for the word “zoom” and a number 1–19.
Results and suggestions
- As you type, we show a short list of places.
- Click one to center the map and set the link.
- We keep the list small and useful. No clutter.
The link you can share
- After the map updates, we set the link with
lat
,lng
, andzoom
. - The page URL stores your query as
q
and your zoom aszoom
. - If someone opens that link, the page auto-runs the search and shows the same view.
- This makes it easy to coordinate with others.
Performance and limits
- We debounce input, so we don’t send a request on every keystroke.
- We respect geocoding rate limits and attribution rules.
- If the service is busy or returns nothing, we show a clear message and do nothing else.
- We keep most logic on the client. It is fast and simple.
Language and clarity
- The UI follows your chosen language.
- Labels, errors, and the placeholder text are short and plain.
- No jargon in the default view. Power details are available when needed.
Error messages you might see
- “No results found. Try a city, coordinates like ‘lat, lng’, or a tile ‘z/x/y’.”
- “Please enter numbers for coordinates.”
- “Zoom must be between 1 and 19.”
Short and honest. No drama.
Privacy
- We do not store your queries on a server.
- Your language choice is saved locally on your device.
- We show clear attribution for data sources.
What we won’t do
- We won’t guess if your input is ambiguous and returns many different places. We will show options. You pick.
- We won’t show long, noisy lists. Top results only.
What comes next
- Quick keyboard flows: Enter to search, arrow keys to pick, Enter to jump.
- Smarter parsing: “city zoom N” patterns, more tolerant commas and spaces.
- Copy button for the shareable link.
That’s it. One search box. Cities for most people. Coordinates for anyone who has them. Tiles for the folks who think in Z/X/Y. Fast, precise, shareable.
- Type what you know.
- Pick your result.
- Jump to the exact spot.