Ali Mapsخرائط علي

A maps engine built in Saudi Arabia, from first principles: an embeddable map for your page, and turn-by-turn navigation for the vehicles that serve it. Riyadh first, the Kingdom after.محرّك خرائط بُني في السعودية من المبادئ الأولى: خريطة قابلة للتضمين في صفحتك، وملاحة خطوةً بخطوة للمركبات التي تخدمها. الرياض أولاً، ثم المملكة.

The dependency tree is inverted. There is no backend and no API: the browser fetches tiles from object storage and does the drawing and the routing itself. A route is computed on your device and never sent to us.شجرة الاعتماد مقلوبة. لا خادم خلفي ولا واجهة برمجية: يجلب المتصفّح البلاطات من تخزين الكائنات، ويتولّى الرسم وحساب المسار بنفسه. فالمسار يُحسب على جهازك ولا يُرسل إلينا أبداً.

In development — not open for sign-up yet. This page describes how it behaves.قيد التطوير — لم يُفتح للتسجيل بعد. تصف هذه الصفحة كيف تتصرّف.

Overviewنظرة عامة

What it isما هي

An embeddable component for the web, and a navigation engine inside it. You place a map on your page, show what you need on it — depots, drivers, a delivery in progress — and ask it for a route between two points. The same road data draws the map a customer looks at and solves the turn-by-turn a driver follows.مكوّن قابل للتضمين في الويب، ومحرّك ملاحة بداخله. تضع خريطة في صفحتك، وتعرض عليها ما تحتاجه — مستودعات، سائقين، طلباً قيد التوصيل — وتطلب منها مساراً بين نقطتين. وبيانات الطرق نفسها هي التي ترسم الخريطة التي يراها عميلك وتحلّ الملاحة التي يتبعها سائقك.

It renders roads, routes and what you put on them. It is not a satellite view and is not trying to be one — the product is the network and the navigation over it.ترسم الطرق والمسارات وما تضعه عليها. وليست عرضاً بالأقمار الصناعية ولا تسعى لذلك — فالمنتج هو الشبكة والملاحة فوقها.

Coverageالتغطية
A few districts of Riyadh, growingبضعة أحياء من الرياض، وتتوسّع
Backendالخادم الخلفي
None — tiles from object storageلا شيء — بلاطات من تخزين الكائنات
Routingالمسارات
In your browser — no API to callفي متصفّحك — بلا واجهة برمجية تُستدعى
Road dataبيانات الطرق
Ours — published to you, yours to useملكنا — تُنشر لك، ولك أن تستخدمها
Statusالحالة
In development — not open for sign-up yetقيد التطوير — لم يُفتح للتسجيل بعد
Architectureالبنية

There is no backend, and that is the whole designلا يوجد خادم خلفي، وهذا هو جوهر التصميم

A maps platform is normally a fleet of servers — a tile service, a routing API, a geocoder — and every question you ask goes to one of them. That is why it is metered: you pay per map load and per route, for as long as you keep using it, and the bill grows with your traffic rather than with your needs.منصة الخرائط عادةً أسطولٌ من الخوادم — خدمة بلاطات، وواجهة برمجية للمسارات، ودليل أماكن — وكل سؤال تطرحه يذهب إلى أحدها. ولهذا تُقاس بالعدّاد: تدفع لكل تحميل للخريطة ولكل مسار ما دمت تستخدمها، وتكبر الفاتورة مع حركة زوّارك لا مع حاجتك.

Ours inverts that tree. The expensive work is done once, ahead of time, and published as tiles — tile-based data structures sitting in object storage. Your browser fetches the tiles it needs and does the rest itself: it draws the map, and it solves the route. There is no API to call and no routing server to wait for.أمّا نحن فنقلب تلك الشجرة. يُنجز العمل المكلف مرّة واحدة مسبقاً ويُنشر على هيئة بلاطات — بِنى بيانات مقسّمة إلى بلاطات تقيم في تخزين الكائنات. يجلب متصفّحك ما يحتاجه منها ويتولّى الباقي بنفسه: يرسم الخريطة، ويحلّ المسار. فلا واجهة برمجية تُستدعى ولا خادم مسارات يُنتظر.

A route is computed on your device and is never sent to us. What our servers hand out is tiles, and they are the same tiles for everybody.يُحسب المسار على جهازك ولا يُرسل إلينا أبداً. وما تقدّمه خوادمنا هو البلاطات، وهي نفسها للجميع.
The dataالبيانات

The data is ours, and we publish it to youالبيانات ملكنا، ونحن ننشرها لك

It comes from satellite imagery, fed through a processing engine of our own. Roads are found by reading that imagery and deciding, metre by metre, that a road is there.تأتي من صور الأقمار الصناعية، ممرَّرةً عبر محرّك معالجة من صنعنا. تُكتشف الطرق بقراءة تلك الصور وتقرير — متراً بمتر — أن هنا طريقاً.

What we publish to you is ours. It does not belong to Google or to anybody else, and you are free to use it on your site. The exact terms will be published with the data itself.وما ننشره لك هو ملكنا. لا يعود إلى جوجل ولا إلى غيرها، ولك أن تستخدمه في موقعك بحرّية. وستُنشر الشروط الدقيقة مع البيانات نفسها.

It is slower to grow and far less complete than a map assembled out of everybody else's, and both of those are true today. What is missing is listed further down this page rather than left to be discovered.ونموّها أبطأ واكتمالها أقل بكثير من خريطة جُمعت من عند الآخرين، وكلا الأمرين صحيح اليوم. وما ينقصها مذكورٌ أسفل هذه الصفحة بدل أن يُترك ليُكتشف.

Correctionsالتصحيحات

Traversal of lanes inside roadsالسير في المسارات داخل الطرق

A road on the map is a single line. A vehicle on that road is never on it — it travels in a lane, a metre or two to one side, and which side depends on which way it is going. Measure how far a fix sits from the centreline and the lane is most of what you have just measured.الطريق على الخريطة خطٌّ واحد. والمركبة على ذلك الطريق ليست عليه قطّ — بل تسير في مسار، على بُعد متر أو مترين إلى أحد الجانبين، وأيُّ جانب يتوقّف على الاتجاه الذي تسير فيه. فإذا قِسْتَ كم تبعد الرصدة عن الخطّ الأوسط، كان المسار معظمَ ما قِسْتَه للتوّ.

Direction is what makes it measurable. Drive the same road back the other way and the lane offset flips to the other side of the line — same vehicle, same road, the measurement mirrored. That reversal is what identifies it: a lane is the part of the measurement that changes sides when you turn round.والاتجاه هو ما يجعله قابلاً للقياس. قُد الطريق نفسه عائداً في الاتجاه الآخر: تنقلب إزاحة المسار إلى الجهة الأخرى من الخطّ — المركبة نفسها، والطريق نفسه، والقياس معكوساً. وهذا الانعكاس هو ما يميّزه: فالمسار هو الجزء من القياس الذي يبدّل جهته حين تستدير.

A tile that cannot support a measurement says so. It is marked rejected and inherits from its neighbours, rather than publishing a confident-looking lie. That is the whole difference between a measurement and a number.والبلاطة التي لا تسند قياساً تقول ذلك. فتُعلَّم مرفوضة وترث من جاراتها، بدل أن تنشر كذبةً تبدو واثقة. وهذا هو الفرق كلّه بين قياسٍ ورقم.

The fit is iteratively reweighted least squares with a Huber loss, tuned at 1.345 — the value that keeps ninety-five per cent of an ordinary fit's efficiency on clean data while still clipping the tails. The tails here are real rather than theoretical: a fix matched onto the service road running parallel to the one it was actually on. The scale those weights are judged against comes from the median absolute deviation, floored at five centimetres, because a tile whose residuals are genuinely tiny would otherwise drive that scale towards zero and begin rejecting perfectly good observations for being ordinary.والملاءمة مربّعاتٌ صغرى مُعاد ترجيحها تكراراً بخسارة هوبر، مضبوطةً عند 1.345 — وهي القيمة التي تُبقي خمسة وتسعين في المئة من كفاءة الملاءمة العادية على بيانات نظيفة، وتقصّ الأطراف مع ذلك. والأطراف هنا حقيقية لا نظرية: رصدةٌ طوبقت على طريق الخدمة الموازي للطريق الذي كانت عليه فعلاً. والمقياس الذي تُحاكم إليه تلك الأوزان يأتي من الانحراف المطلق الوسيط، بحدٍّ أدنى خمسة سنتيمترات، وإلّا لدفعت بلاطةٌ بقاياها ضئيلة حقاً ذلك المقياس نحو الصفر وأخذت ترفض أرصاداً سليمة تماماً لأنها عادية.

RANSAC would have worked here, and it was turned down on purpose. It finds a consensus set and hands it to you; what it does not hand you is how sure it is. The fit above degrades gracefully instead — given a sample that is contaminated but not hopeless it still returns a usable estimate and an honest standard error. And the standard error is what the decision to publish is made of, so an algorithm that cannot state its own uncertainty is the wrong tool for a gate made of uncertainty.وكانت RANSAC ستفي بالغرض هنا، وقد رُفضت عن عمد. فهي تجد مجموعة توافق وتسلّمها إليك؛ والذي لا تسلّمه هو مقدار يقينها. أمّا الملاءمة أعلاه فتتدهور بلطف بدلاً من ذلك — فمع عيّنة ملوّثة غير ميؤوس منها تعيد تقديراً صالحاً وخطأً معيارياً صادقاً. والخطأ المعياري هو ما يُبنى عليه قرار النشر، فالخوارزمية التي لا تستطيع بيان قدر عدم يقينها هي الأداة الخطأ لبوّابةٍ مصنوعة من عدم اليقين.
Navigationالملاحة

The tiles carry the road network itself, not pictures of it — so once the browser holds the tiles for an area it can solve a route across them without asking anybody. A driver whose device already has them keeps navigating when the signal does not: a basement car park, a yard, a tunnel approach.تحمل البلاطات شبكة الطرق نفسها لا صوراً لها — فمتى كانت بلاطات منطقةٍ لدى المتصفّح، حلّ المسار فوقها دون أن يسأل أحداً. والسائق الذي تكون لديه أصلاً يواصل الملاحة حين تنقطع التغطية: في قبو مواقف، أو ساحة، أو عند مدخل نفق.

Multi-stop routes are solved as one problem rather than as a series of pairs, which is what a delivery round actually is. Turns carry a cost, so a route with twenty of them does not win over a straight one by a few metres.وتُحلّ المسارات متعدّدة المحطات كمسألة واحدة لا كسلسلة من الأزواج، وهو ما تكون عليه جولة التوصيل فعلاً. وللانعطافات كلفة، فلا يتفوّق مسارٌ بعشرين انعطافة على آخر مستقيم بفارق أمتار.

Algorithmsالخوارزميات

The algorithms, namedالخوارزميات، بأسمائها

Every navigation system you have ever used runs on the same handful of ideas, and not one of them tells you which. That is a strange thing to keep quiet about. The ideas were worked out decades ago, they are still the right answer, and none of them is hard to explain. So here is what actually happens between asking for a route and getting one.كل نظام ملاحة استخدمته يقوم على الحفنة نفسها من الأفكار، ولا يخبرك أيٌّ منها بأيِّها. وهو كتمانٌ غريب. فالأفكار وُضعت قبل عقود، وما زالت هي الجواب الصحيح، وليس في شرح واحدةٍ منها عسر. فإليك ما يجري فعلاً بين أن تطلب مساراً وأن تحصل عليه.

A* is the search. Its ancestor, Dijkstra's algorithm, finds the best route by spreading outward from where you are in every direction at once — like a stain — until it happens to reach the destination. Correct, and it examines most of the city on the way. A* keeps all of that except the blindness: at each step it also asks how far the destination still is as the crow flies, and looks at the most promising road first. The stain becomes a beam. Across a city that is the difference between searching a city and searching a corridor.و A* هي البحث. سلفها خوارزمية دايكسترا تجد أفضل مسار بالانتشار من موضعك في كل اتجاه دفعةً واحدة — كبقعةٍ تتّسع — حتى تبلغ الوجهة مصادفةً. صحيحةٌ، وتفحص معظم المدينة في طريقها. وتُبقي A* على ذلك كلّه إلّا العمى: فهي تسأل في كل خطوة كم بقي إلى الوجهة في خطٍّ مستقيم، وتنظر في الطريق الأوعد أوّلاً. فتصير البقعةُ شعاعاً. وعبر مدينةٍ كاملة يكون ذلك هو الفرق بين أن تبحث في مدينة وأن تبحث في ممرّ.

The guess has exactly one rule, and everything rests on it: it must never be too big. Ours estimates the time still to go as though you could fly straight to the destination at 120 km/h — faster than anything here actually travels, so the guess is always cheaper than the truth. That sounds like a technicality and it is the entire guarantee: while the estimate stays optimistic, the first complete route the search settles on is provably the best one, not merely a good one. Let the guess run high and the search gets faster and begins quietly handing back second-best routes — wrong in the way nobody notices until they know the city better than the map does.وللتخمين قاعدة واحدة لا غير، وعليها يقوم كل شيء: ألّا يكون أكبر من الحقيقة أبداً. وتخميننا يقدّر ما بقي من الزمن كأنّك تطير إلى الوجهة في خطٍّ مستقيم بسرعة 120 كم/س — أسرع ممّا يسير به أيّ شيء هنا فعلاً، فيكون التخمين أرخص من الحقيقة دائماً. يبدو هذا تفصيلاً فنّياً، وهو الضمانة كلّها: فما دام التقدير متفائلاً، كان أوّل مسار كامل يستقرّ عليه البحث هو الأفضل إثباتاً، لا حَسَناً فحسب. وإن جاوز التخمين حدّه، أسرع البحث وأخذ يعيد بهدوء مساراتٍ ثانيةَ الأفضل — خطأٌ لا ينتبه إليه أحد حتى يعرف المدينة أكثر ممّا تعرفها الخريطة.

What is being minimised is time, not distance — each stretch of road costs its length divided by the speed vehicles are actually observed to travel on it. And then eight seconds are added every time you turn.وما يُقلَّل هو الزمن لا المسافة — إذ يكلّف كلُّ جزءٍ من الطريق طولَه مقسوماً على السرعة التي تُرصد المركبات وهي تسير بها عليه فعلاً. ثم تُضاف ثماني ثوانٍ كلّما انعطفت.

Eight seconds per junction. You have been handed the route that makes twenty turns through side streets to save forty metres, and you did not take it. The fix is not clever: whenever the next road has a different identity from the one you are on, the search adds eight seconds to the bill. Turning costs something in life, so it costs something here, and the straight road wins as it should.ثماني ثوانٍ لكل تقاطع. لقد أُعطيت من قبلُ ذلك المسار الذي ينعطف عشرين انعطافة في شوارع فرعية ليوفّر أربعين متراً، ولم تسلكه. والعلاج ليس بارعاً: فكلّما اختلفت هوية الطريق التالي عن الطريق الذي أنت عليه، أضاف البحث ثماني ثوانٍ إلى الحساب. فللانعطاف كلفةٌ في الحياة، فلتكن له كلفةٌ هنا، ويفوز الطريق المستقيم كما ينبغي.

The route is searched for twice, and the first search is not looking for a route. It runs over the arteries only, and what comes out of it is thrown away. What is kept is the list of map tiles it passed through — those get downloaded, and then the real search runs over them. Planning a journey in order to work out what to download sounds like a detour, and it removes the hardest problem in routing across a map you do not yet hold: the second search begins with everything it will ever need already in hand, so it never stops half-way to wait. Over ten journeys across the city, the corridor chosen this way never once excluded the best route.ويُبحث عن المسار مرّتين، والبحث الأوّل لا يبحث عن مسار. فهو يجري على الشرايين وحدها، ويُطرَح ما يخرج منه. والذي يُحتفظ به قائمةُ بلاطات الخريطة التي مرّ بها — فتُنزَّل تلك البلاطات، ثم يجري البحث الحقيقي فوقها. قد يبدو التخطيط لرحلةٍ لمعرفة ما يُنزَّل التفافاً، وهو يزيل أصعب مسألة في التوجيه عبر خريطة لا تملكها بعد: إذ يبدأ البحث الثاني وكلُّ ما سيحتاجه بين يديه، فلا يقف في منتصف الطريق منتظراً. وعبر عشر رحلات في المدينة، لم يستبعد الممرُّ المختار بهذه الطريقة أفضلَ مسار ولا مرّة.

A browser does not come with a priority queue, and the search needs one — it spends its whole life asking which is the most promising road it has not looked at yet. So the engine carries its own, a binary heap in about sixty lines. It is the sort of thing a server inherits from a library without thinking about it, and a phone has to bring along.ولا يأتي المتصفّح مزوَّداً بطابور أولويات، والبحث يحتاج إليه — فهو يقضي عمره كلّه يسأل: أيُّ الطرق التي لم أنظر فيها بعدُ أوعدُ؟ فصار المحرّك يحمل طابورَه معه، كومةً ثنائية في نحو ستين سطراً. وهو ممّا يرثه خادمٌ من مكتبةٍ جاهزة دون أن يفكّر فيه، ويضطرّ الهاتف إلى حمله معه.

Douglas–Peucker thins the lines before they are drawn, and the interesting part is where it is switched off. Zoomed out, a road's exact vertices are a browser-killing payload that renders as a grey smear anyway, so the geometry is thinned on the way out — roads under a rule that forbids one collapsing into its neighbour, recorded traces under a plainer one that permits it. Past a certain zoom the thinning drops to zero, because that is the point at which a three-metre error becomes visible on screen, and smoothing it out of existence would defeat the purpose of the entire map.وتُرقّق خوارزمية دوغلاس–بيوكر الخطوط قبل رسمها، والمثير فيها هو أين تُطفأ. فعند التصغير تكون رؤوس الطريق الدقيقة حِملاً يقتل المتصفّح ويُرسم لطخةً رمادية على أي حال، فتُرقَّق الهندسة عند الخروج — الطرق بقاعدة تمنع انهيار الواحد في جاره، والمسارات المسجّلة بقاعدة أبسط تسمح بذلك. وبعد تكبير معيّن يهبط الترقيق إلى الصفر، لأن عنده يصير خطأ الأمتار الثلاثة مرئياً على الشاشة، ومحوُه تنعيماً يُبطل الغاية من الخريطة كلّها.

A* is only ever as good as the graph beneath it. Every guarantee above is about finding the shortest path through the network we built; none of it says that network matches the street. That is what the next section is for.ولا تكون A* أفضل حالاً من الرسم البياني الذي تحتها. فكل ضمانة أعلاه تتعلّق بإيجاد أقصر مسار داخل الشبكة التي بنيناها، ولا تقول شيئاً عن مطابقة تلك الشبكة للشارع. وذلك موضوع القسم التالي.
Limitsالحدود

What it cannot do yetما لا تستطيعه بعد

This is early, and the list below is not a roadmap — it is what is missing today, stated so that nobody discovers it after committing to us.هذه بداية مبكّرة، وما يلي ليس خارطة طريق — بل هو الناقص اليوم، نذكره كي لا يكتشفه أحد بعد أن يرتبط بنا.

  • Coverage is small. A few districts of Riyadh have a routable network. The city has hundreds, and the Kingdom is further off than that.التغطية صغيرة. بضعة أحياء من الرياض لها شبكة قابلة للتوجيه. وفي المدينة مئات الأحياء، والمملكة أبعد من ذلك.
  • There are no street names. None have been invented, and none will be. Until they are collected properly, the map shows roads without naming them.لا توجد أسماء شوارع. لم يُختلق منها شيء ولن يُختلق. وإلى أن تُجمع على وجهها الصحيح، تعرض الخريطة الطرق دون تسميتها.
  • You cannot search for a place. There is no gazetteer yet, so a destination is given as a point rather than looked up by name.لا يمكنك البحث عن مكان. لا يوجد دليل أماكن بعد، فتُعطى الوجهة كنقطة بدل البحث عنها بالاسم.
  • Speeds are observed, not posted. An edge costs its length divided by the speed vehicles are seen to travel on it, so a road nobody has driven yet is routed on an assumption rather than on a measurement.السرعات مرصودة لا مُعلَنة. فكلفة الحافّة طولها مقسوماً على السرعة التي تُرى المركبات تسير بها عليها، فالطريق الذي لم يسلكه أحد بعد يُوجَّه عليه بافتراض لا بقياس.
  • Tunnels are invisible. A road under the ground cannot be seen from above, and that is a permanent limit of how this network is built rather than a gap awaiting work.الأنفاق غير مرئية. فالطريق تحت الأرض لا يُرى من فوقها، وهذا حدٌّ دائم لطريقة بناء هذه الشبكة لا ثغرة تنتظر العمل.
  • Nothing has been checked against a real vehicle yet. The network is measured against imagery, not against a recorded drive. Until that changes, treat the accuracy as unproven.لم يُقارَن شيء بمركبة حقيقية بعد. فالشبكة تُقاس على الصور لا على قيادة مسجّلة. وإلى أن يتغيّر ذلك، فاعتبر الدقّة غير مُثبَتة.
Why hereلماذا هنا

Built in Saudi Arabiaبُنيت في المملكة العربية السعودية

Riyadh is where this started because it is where we are, and because a city of wide grey roads on pale ground is the clearest case this problem will ever get. What is learned here is what makes the rest of the Kingdom possible.بدأ هذا في الرياض لأننا هنا، ولأن مدينةً ذات طرق رمادية عريضة على أرض فاتحة هي أوضح حالة ستواجهها هذه المسألة. وما نتعلّمه هنا هو ما يجعل بقيّة المملكة ممكنة.