Is there any navigation dijit or map option , used for panning the map?

Is there any navigation dijit or map option , used for panning the map?

We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

I want to add an add-on to my map that will allow the user pan the map by clicking on it. I am thinking something like the zoom toolbar where the user csn click on the +- buttons to zoom in/out. Any ideas?

What you are looking for is the nav property, which you can set in your options object when creating the map. See here in the constructor:

Displays pan buttons on map. When false, the pan arrows never display. The default is false.

It accepts a boolean, so all you have to do is set it to true when creating your map, such as here:

var map = new Map("mapDiv", { basemap: "streets", center: [-100, 32.52], zoom: 7, nav:true });

Eight small arrows should now appear on your map, which can be used to pan when clicking on them. They're gray, so they are sometimes hard to see, depending on which basemap you use!

Automotive navigation system

An automotive navigation system is part of the automobile controls or a third party add-on used to find direction in an automobile. It typically uses a satellite navigation device to get its position data which is then correlated to a position on a road. When directions are needed routing can be calculated. On the fly traffic information can be used to adjust the route.

Dead reckoning using distance data from sensors attached to the drivetrain, a gyroscope and an accelerometer can be used for greater reliability, as GPS signal loss and/or multipath can occur due to urban canyons or tunnels.

Mathematically, automotive navigation is based on the shortest path problem, within graph theory, which examines how to identify the path that best meets some criteria (shortest, cheapest, fastest, etc.) between two points in a large network.

Automotive navigation systems are crucial for the development of self-driving cars. [1]


Layers contain visualized dimension and measure data that is displayed over your map. You can stack layers on top of each other. You can also control at what zoom levels different layers appear in or have layers that appear only if other values in a drill-down dimension are selected. This enables you to create different levels of detail as you make selections and zoom in and out of areas of interest on your map. Layers can be point, area, line, density, chart, or background layers.

Point layer

A point layer overlays individual locations on a map, representing them with shapes. By default, point layers use circular bubbles, but you can also use several other shapes. The size of the points in your layer can be fixed or you can specify a measure or expression to set the sizes of the different points. You can highlight these differences in values further by coloring by measure.

Area layer

An area layer presents areas on your map, such as countries or states. With polygon geometry loaded into a field, it can present any custom area.

With an area layer, each dimension value corresponds to a presented area. By using colors with your area layer, you can present different measure values for the areas. In the properties panel, under Appearance > Colors and legend , switch Colors to Custom where the options By measure and By expression are available.

Line layer

A line layer enables you to display lines between points on your map. For example, you can use a line layer to show aircraft flights between cities. With a line layer, you can use two fields containing point data to define the start points and end points for lines in the layer. Alternatively, you can use a field containing line geometry in either GeoJSON LineString or MultiLineString format. You can customize the width and curvature of lines in the line layer and add directional arrows to your lines.

Density layer

A density layer enables you to visualize the density of points in an area using a color ramp. Each point influences a circular area, with the highest influence at the center and declining towards its outer perimeter. You can specify the influence radius of the points, change its color and scale it to suit your visualization. Density layers can be used to show hotspots of activity, population densities and more.

Chart layer

A chart layer enables you to display small pie charts or bar charts over locations in your map. It uses one dimension to identify the locations and a second dimension to create the pie or bar charts. You can label the charts and use an expression to control their size. The info bubble displays useful information about the contents of the selected chart.

Background layer

Background layers enable you to display a custom base map for your map visualization. A background layer could, for example, be a map of an airport that then has a point layer with WIFI hotspot locations overlaid on it. If the custom base map format supports transparency, you can overlay it on top of another map. Qlik Sense supports the following custom maps formats as background layers:

Maps services must be located on their own server. Unlike other layers, the background layer uses no dimensions or measures and only displays an external base map.

If your WMS contains areas with no data, you can set the areas with no data to be transparent. This enables the WMS background layer to be overlaid on another base map or background layer. You can also choose which WMS layers to include in the background layer.

You can insert an image as a background layer. This can be used as a custom base map. You could add an image of a floor plan and use it as a custom base map. An image background layer can also be overlaid on top of another background layer. For example, you could insert an image of a detailed local map as a background layer over top another map. Background layers support the following image types:

I guess I'm a little bit late to the party, but since this was exactly what I needed just now AND I improved on it, I thought I'd post an answer anyway.

With both the answers of Daniel Vassallo and brendo, the user can still use the pan-control (if it's activated) to move away from the wanted area. The thing @Yauhen.F mentioned in a comment.

So instead of using the dragend event, I use the center_changed event. This is continuously fired during dragging and every time someone uses the pan control.

By saving the last valid position continuously during the dragging, the movement will just stop once it's out of bounds, instead of yerking back once the dragging ended. .

The trick is to listen to the dragend event, and if the map is dragged outside the allowed bounds, move it back inside. If you define your allowed bounds as a LatLngBounds object, you can use the contains() method, since it returns true if the given lat/lng argument is within the bounds.

It is also important to limit the zoom level, but it seems you are already doing this.

Therefore, you may want to try the following example:

Screenshot from the above example. The user will not be able to drag further south or far east in this case:

My version, based on the one from @HenningJ, but with some modification of the lastValidCenter to allow smooth dragging along the edges of the bounds.

Here is a nice extension to the above that will reset the Map's center to the last valid position by listening to the dragstart event.

The best method to restrict is, set the zoom level and center point and disable the controls like zoom, scroll etc like below.

The new version of google map API now provides a way to restrict boundary. Just specify your restriction boundaries when you initialize the map. For example if you want to restrict boundary to Newzeland only, this is how you do it:

FYI: To restrict the map of the whole world you can use the following bounds. The tricky part here is to use strictBounds:true . This will make sure that the user can not zoom out of the world view:

Here's a solution which is a merge together of Tom Andersen's answer and the currently accepted HenningJ answer. The benefits of this is it 1) allows for smoother scrolling along edges (which HenningJ's solution seemed clunky with), and 2) doesn't have any issues when zooming in an out of an area (again HenningJ's answer seemed to break when zooming in and out near the boundaries).

Tom's answer was close to working for me, except it positioned the locked off area into the center of the screen, which wasn't acceptable for the application I was working on.

There is another thread on the subject that is also very good. The problem I had to solve was that instead of setting boundaries manually and checking center containment, I wanted a boundary set on page load, then allow dragging to the edge if zoomed in.

So I set panning boundaries on map load, once. Then I check if map is still at max zoom and if so, return the initial center. If zoomed in, I want to pan to the EDGE of initial boundaries, not just check if CENTER contained, because that would extend the allowed panning by half the viewport.

Unfortunately, although this gets the job done and works fine when paning slowly, it's a bit jerky if you pan quickly.

If you have suggestions on how this can be avoided, I'd be grateful.

I tried the answer from HenningJ and the map wouldn't stop panning until the center was in a corner of the bounds which was not ideal. Here is my solution:

Here's a simple solution that will work across mobile and desktop. It will stop the map panning beyond the world's maximum or minimum latitude, and allows a minimum zoom level to be set, which can help to prevent grey areas becoming visible through zooming too far out (depending on the size you set for your map):

(I recommend caution in using the center_changed event as suggested in the accepted answer by HenningJ. In my case the number of events this creates caused stack overflow errors in Google Chrome. Instead, the 'dragend' event can be used - although this will allow the user to drag outside of the areas, and will then immediately 'snap back' to a valid area of the map).

When I'm using drag or dragend or whatever, the map jumps back into allowed bounds instead of simply restricting overflowing movement. Just change the event to 'center_changed' to stop it from jumping around like that.

Edit: Not sure why the fiddle doesn't produce a stack overflow but it should, since setCenter will call center_changed again.. Just watch out

The solutions here left me with 2 issues. First of all, if you held down the arrow key so that it started panning rapidly, when it hit the edge, it wouldn't go all the way to the edge because due to the panning acceleration taking large "steps", the next "step" would have gone outside the bounds, so it doesn't take that last "step". So once it stopped, you could release the arrow key and then press it again, and it would pan just a little bit further. Second, these solutions didn't properly contain the panning after a zoom change. I managed to solve both, and posted my solution in another thread, but I thought I'd link it here, since this was the thread that first got me started in the right direction.

This is HenningJ - but HenningJ on ios uses lastValidCentre - which is not good, as its old, so I clamp, which makes it better on iOS.

I'll post my answer in case anyone's interested because I couldn't achieve what I needed with any of the other solutions posted here.

What I needed was to restrict the vertical bounds (latitude) of the map so that the user would not be able to pan beyond the latitude bounds of the earth (

+/-85 degrees), but any other bounds would work too.

This approach uses the same center_changed event as described elsewhere and simply fixes the center in case parts of the prohibited bounds are shown.

This mechanism only works if the minimum zoom of the map is set so that zooming out can never show more area than that within the allowed bounds.

I know I am little late to the party, but it seems that as of middle 2016, there is no official way to restrict viewable area.

There are some solutions to restrict the bounds (some of them in this question) but for me they have a flaw though, because they don't restrict the bounds exactly to fit the map view, they only restrict the map center be contained within the specified bounds. If you want to restrict the bounds to overlaying image like me, this can result in a behavior like illustrated below, where the underlaying map is visible under our image overlay:

To tackle this issue, I have created a library, which successfully restrict the bounds so you cannot pan out of the overlay.

However, as other existing solutions, it has a "vibrating" issue. When the user pans the map aggressively enough, after they release the left mouse button, the map still continues panning by itself, gradually slowing. I always return the map back to the bounds, but that results in kind of vibrating, which settles after a moment. This panning effect cannot be stopped with any means provided by the Js API at the moment. It seems that until google adds support for something like map.stopPanningAnimation() we won't be able to create a smooth experience.

Example using the mentioned library, the smoothest strict bounds experience I was able to get:


Pace Count

The first step is to get an accurate pace count and to build a set of pace count beads, these will help you track your distance traveled, which is a crucial step in navigation. We have a great article on how to build your own pace count beads.

Measure out a 100-meter line and walk it several times to get an accurate pace count. I recommend starting a meter behind the beginning of the line so that you’re already walking your natural pace when you begin your count. Another piece of advice is to only count each time your right or left foot hits the ground during your pace count. This will cut the number in half and make it much easier to keep count in the field.

If possible, get a pace on flat ground as well as walking both up and down a hill. You’ll find that your pace will change greatly under different circumstances. When a hill is incorporated, your number will rise compared to your flat ground count. Adding vegetation and trees will change your pace as well. It’s not an exact science, but any chance to get a count with a different terrain variable should be taken as it’ll help you out down the road. Your pace is really a lesson in knowing yourself and when you should add or subtract paces in your planning.

Shooting a Bearing

Now that you’re out in the field and standing on your MGRS starting point, you’ll need to shoot a bearing to the point you’re traveling to. As a refresher, this step consists of turning the bezel on your compass to the bearing you’ll be walking, say it’s 090˚.You’ll line up 090˚ with the top indicator of your compass and then turn your body until “red is in the shed” or whatever way you remember to align the north facing needle into the red arrow of the bezel.

Once you have your bearing, put your compass in front of your face while keeping your arms in tight to your body and look through the top sighting notch of your compass. This is where the mirror comes into play on the top lid, adjust it down so you can see that the red is still in the shed and pick out an easily identifiable object as far away as possible. Although you won’t see your intended target you’re navigating to in the end, this is the object you can now walk to without having to continuously reference your compass.

Now that you’ve chosen your point, perhaps its a large recognizable tree, put your compass down and begin walking in as straight a line as possible towards the tree. Make sure to keep track of your pace count as you walk and to keep your eyes on the target so that you don’t lose your way. When you arrive at the object, get to the other side of it and shoot another bearing to a new target and start walking again. Don’t forget to resume your pace count and do not just start again.

When you’ve traveled to your known distance, stop and mark that location with whatever you have available. I recommend stacking three stones on top of each other, though others recommend dropping your backpack, or placing a marking panel on the spot. The goal here is to not let your original stopping point become lost if you have to search for a marker that designates the point you’ve navigated to. Again, I recommend using rocks because I never feel comfortable separating myself from my backpack.

Accuracy is key here. It doesn’t take as much degradation as you think to throw you off your bearing and take you completely off course. In fact, if you were to walk for 10 miles and you’re even 1 degree off, you’ll have traveled 280 meters off course. If you’re off by 10 degrees on your bearing, you’ll have traveled an amazing 2,795 meters off course.

Circle Search

From your closest known point you’ll want to begin your search with a small circle. The size of the circle is always dependent on the terrain you’re dealing with. In fact, most questions about land navigation end with the answer, “it depends.” This is because there are so many variables that will change your technique.

If the closest line of vegetation is far away and you can see that your target isn’t between you and the vegetation, adjust your circle to give you additional vantage points from varying angles. While the size of your target will also change the size of your circles, the circle itself will remain the same. If you complete one full circle and arrive back at your point then begin another larger circle, repeating larger concentric circles until you find the target.


So what happens when there’s a large object between you and the target half way through your navigation leg? Since you’re dependent on the bearing and pace, you’ll need to find a way to get around it and wind up close to the same line of travel on the other side of the object in your way. This can be accomplished by using 90 degree turns and keeping a separate pace count for lateral lines of travel.

First take a 90 degree turn to the right (or left if applicable). Keep a pace count for the distance that it takes you to be free of the obstacle. Then take another 90 degree turn to your left. Now you resume your original pace count because you’re now walking in your original direction of travel. When you’re clear of the obstacle, make another 90 degree turn to your left. If your lateral pace count was 60 meters then you’ll need to travel 60 meters back in the direction of your original line of travel. When you get to 60 meters, turn 90 degrees to your right. Now you’re relatively close to your original line of travel. Take another bearing and resume your original pace count towards the target.

Offset Navigation

If you know that your next point is positioned next to a linear feature such as a road, river, power lines, or railroad track, you can deliberately offset your course to speed up your travel. For example, if your target is 200 meters away on a bearing of 050˚, then you can deliberately set a course of 045˚ so that you’ll hit the linear feature to the LEFT of your target. Now you can simply skirt the linear feature to the RIGHT until you find your point. This alleviates the need for a circle search. The reason why this tactic works so well is because it gives you two key pieces of information, it eliminates confusion and provides a backstop.

  • No Confusion – If you were to use the linear feature as a backstop and walk your true bearing, you’ll have a good distance, but once you reach the road you won’t know which direction the point is. It could be to the left or to the right. When you deliberately offset your course, you’ll know without a doubt that you should turn right (according to the example above.)
  • Backstop – You know you’ve overshot your point if your pace takes you across the linear feature. The linear feature will tell you “this far, but no further.”

Note that your degree of offset will be directly proportional to the distance of the leg. Meaning that if you’re traveling a 300-meter leg, you’ll use less offset vs. a 100-meter leg. Too much offset could take you too far off course and lead to confusion down the road.

6 Answers 6

The threshold of the smooth panning does not depend on the distance between the current center and the new target. It depends on whether the change will require a full page scroll (horizontally and vertically) or not:


Changes the center of the map to the given LatLng. If the change is less than both the width and height of the map, the transition will be smoothly animated.

Therefore, as long as you are zoomed out such that your viewport is 20 miles in height and width, you should be guaranteed smooth panning for distances under 20 miles.

Here's a solution that pans smoothly and also allows for other click requests to be queue'd up while a previous pan is already in progress:

We developed a workaround to smoothly animate the panTo in all cases.

Basically in cases that the native panTo will not animate smoothly, we zoom out , panTo and zoom in to the destination location.

To use the code below, call smoothlyAnimatePanTo passing the map instance as first parameter and the destination latLng as second parameter.

There is a jsfiddle to demonstrate this solution in action here. Just edit the script tag to put your own google maps javascript api key.

Any comments and contributions will be welcome.

See this other SO answer about using javascript's setInterval function to create a periodic function that calls panBy on your map: Can Google Maps be set to a slow constant pan? Like a globe revolution?

This can be used to pan the map by x pixels on each call to panBy, allowing you to slow down the panBy rate (since you are only telling gmaps to panTo a short distance).

As Daniel has mentioned, the built-in panTo() function will not work for you if the two points are too far apart. You can manually animate it yourself if that's the case though: for each zoom level, figure out the distance covered by say 100 pixels. Now, when you have to pan to a point, you can use this information to figure out if the panTo() funciton will animate or jump. If the distance moved is so big that it will not animate, you should do the animation manually - compute some intermediate waypoints between your current map center and your destination, and pan to them in sequence.

I don't have enough reputation to post as an answer so am posting as a reply to Tato here as his plugin works well for me and is exactly what I needed but has a bug (I use it as a dependency so the map variable is passed through the function)

You need to pass map to function getOptimalZoomOut(latLng, currentZoom) <>

2 Answers 2

You can achieve that with MapBox.

MapBox is an alternative to GoogleMaps and supports offline maps.

Mapbox iOS SDK
There are three methods available to the Mapbox iOS SDK for offline maps. With cache-based methods, the RMTileCache for an RMMapView can be configured to keep map tiles around based on their count or based on their age in the cache.

Caching based on previous user interaction

Tiles are automatically cached once they are downloaded for display based on the user’s panning and zooming of the map. For example, if a user views the map, then zooms out, then zooms back in later when offline, the original tiles will be present in cache and will display without need for a network connection.

Proactive background caching for certain map regions

Using RMTileCache and the RMTileCacheBackgroundDelegate protocol, the developer can enable the user to download a certain bounding box and zoom range in the background in advance of actually displaying them on screen. Callbacks trigger, allowing the developer to report progress to the user or even to cancel a download in progress.

Tiles that already exist in cache will be skipped over during this background download instead of re-downloaded.

MBTiles prepackaged tiles

Using the MBTiles format for map tile storage, developers can build apps that read the tiles straight out of the MBTiles file and do not ever need a network connection. Since MBTiles is an open format, files can be created manually or with TileMill, as well as many other applications and utilities such as mbutil.

If SiteNavigationElement is meant for the whole navigation (i.e., a navigation link list), your first example is correct.

If SiteNavigationElement is meant for a single navigation entry (i.e., a link in the navigation link list), your second example is correct.

I think doesn’t unambiguously define which variant is meant, as they only say:

A navigation element of the page.

However, the parent type WebPageElement is defined as:

A web page element, like a table or an image

Also, all the other child types (like Table or WPFooter ) seem to be used for the whole thing, and not specific parts of the thing.

So this seems to suggest that the whole navigation should be marked up, and not each single link:

In this case, all the properties belong to the whole navigation, so that means the url property would specify a URL for this navigation (and not the URLs of the links in this navigation!).

According to Search Engine Land, it's supposed to look like this:

First answer is correct but I'd mix both for (HTML5-)semantic: extends WebPageElement and can be used to mark-up links, which would often make good contextual links. You can use this schema for your page menu.

Consider the following code snippet adapted from the page source of

When there are multiple navigations as shown above, use of SiteNavigationElement to group navigation items affords the use of name such that the grouping itself may be labeled. Labels for individual items within the groups can be obtained using the content of the links themselves.

Therefore, your first example is more correct despite assertions to the contrary.

OP's original question contained a good example of code. none of the answers do though .

It seems everyone threw in a somewhat random answer . You can test your schema microdata code using the following official google tool

If you run the proposed answers in this tool you will notice that none give you the expected result: a list of SiteNavigationElement with a name & url

Some might argue that a whole menu might be considered a "navigation element" but I think it makes more sense for this denomination to designate a single navigation link. Plus if we use the SiteNavigationElement as a marker for the whole menu we have no way of associating names with URLs in the html.

To achieve this, you need to have each link be encapsulated by an itemscope property and they all need to have their own name and url itemprop (these are singleton as mentioned by @David Harkness, so they have to appear only once per itemprop )

The code above will yeld two different navigation elements, each with a name and an URL.

Note: the itemprop="url" attribute uses the anchor's href attribute as value

Guidance navigation

This is turn-by-turn navigation as used in GPS satnav units from companies such as TomTom, Navman, Garmin, etc.

They use raw data collected by driving the roads, photographing them, mapping them and from satellite images.

The only map data collectors in the world are Navtecm, Teleatlas and Google. They also field-check maps and sell their data to the end users.

They collect the geographic location (lats and longs) and geo-reference images and features.

All of that data is then embedded in proprietary software that can be used on the GPS unit.

Teleatlas was bought by TomTom about 15 years ago and is not sold to any other user.

TomTom is the largest single GPS manufacturer in the world, closely followed by Garmin. But they do not have the majority of the market as there are so many models available.

Their software is set up like moving maps with similar designs for roads, rivers, and even the little position arrow.

The Hema Navigator and Mudmap are the only GPS units that include both turn-by-turn guidance and a moving map option.


National or regional telecommunication administrations that are members of the International Telecommunication Union (ITU) use national telephone numbering plans that conform to international standard E.164.

Telephone numbers that conform to E.164 consist of a country calling code and a national telephone number. National telephone numbers are defined by national or regional numbering plans, such as the European Telephony Numbering Space, the North American Numbering Plan (NANP), or the UK number plan.

Within the national numbering plan, a complete destination telephone number is composed of an area code and a subscriber telephone number. The subscriber number is the number assigned to a line connected to customer equipment. The first few digits of the subscriber number may indicate smaller geographical areas or individual telephone exchanges. In mobile networks they may indicate the network provider. Callers in a given area or country sometimes do not need to include the particular area prefixes when dialing within the same area. Devices that dial telephone numbers automatically may include the full number with area and access codes.

Country codes are necessary only when dialing telephone numbers in other countries than the originating telephone. These are dialed before the national telephone number. By convention, international telephone numbers are indicated in listings by prefixing the country code with a plus sign (+). This reminds the subscriber to dial the international dialing prefix in the country from which the call is placed. For example, the international dialing prefix or access code in all NANP countries is 011, while it is 00 in most European countries. In some GSM networks, it may be possible to dial +, which may be recognized automatically by the network carrier in place of the international access code.

Telephone administrations that manage telecommunication infrastructure of extended size, such as a large country, often divide the territory into geographic areas. This benefits independent management by administrative or historical subdivisions, such as states and provinces, of the territory or country. Each area of subdivision is identified in the numbering plan plan with a routing code. This concept was first developed a nationwide numbering plan for Operator Toll Dialing of the Bell System in the United States in the 1940s, which preceded the North American Numbering Plan for direct distance dialing (DDD). [3] AT&T divided the United States and Canada into numbering plan areas (NPAs), and assigned to each NPA a unique three-digit prefix, the numbering plan area code, which became known in short-form as NPA code or simply area code. The area code is prefixed to each telephone number issued in its service area.

Other national telecommunication authorities use various formats and dialing rules for area codes. The size of area code prefixes may either be fixed or variable. Area codes in the NANP have three digits, while two digits are used in Brazil, one digit in Australia and New Zealand. Variable-length formats exist in multiple countries including: Argentina, Austria (1 to 4), Germany (2 to 5 digits), Japan (1 to 5), Mexico (2 or 3 digits), Peru (1 or 2), Syria (1 or 2) and the United Kingdom. In addition to digit count, the format may be restricted to certain digit patterns. For example, the NANP had at times specific restrictions on the range of digits for the three positions, and required assignment to geographical areas avoiding nearby areas receiving similar area codes to avoid confusion and misdialing.

Some countries, such as Denmark and Uruguay, have merged variable-length area codes and telephone numbers into fixed-length numbers that must always be dialed independently of location. In such administrations, the area code is not distinguished formally in the telephone number.

In the UK, area codes were first known as subscriber trunk dialling (STD) codes. Depending on local dialing plans, they are often necessary only when dialed from outside the code area or from mobile phones. In North America ten-digit dialing is required in areas with overlay plans.

The strict correlation of a telephone to a geographical area has been broken by technical advances, such as local number portability and Voice over IP service. [4]

When dialing a telephone number, the area code may be preceded by a trunk prefix (national access code), the international access code and country code.

Area codes are often quoted by including the national access code. For example, a number in London may be listed as 020 7946 0321. Users must correctly interpret 020 as the code for London. If they call from another station within London, they may merely dial 7946 0321, or if dialing from another country, the initial 0 should be omitted after the country code.

A dial plan establishes the expected sequence of digits dialed on subscriber premises equipment, such as telephones, in private branch exchange (PBX) systems, or in other telephone switches to effect access to the telephone networks for the routing of telephone calls, or to effect or activate specific service features by the local telephone company, such as 311 or 411 service.

A variety of dial plans may exist within a numbering plan and these often depend on the network architecture of the local telephone operating company.

Variable-length dialing

Within the North American Numbering Plan (NANP), the administration defines standard and permissive dialing plans, specifying the number of mandatory digits to be dialed for local calls within the area code, as well as alternate, optional sequences, such as adding the prefix 1 before the telephone number.

Despite the closed numbering plan in the NANP, different dialing procedures exist in many of the territories for local and long-distance telephone calls. This means that to call another number within the same city or area, callers need to dial only a subset of the full telephone number. For example, in the NANP, only the seven-digit number may need to be dialed, but for calls outside the local numbering plan area, the full number including the area code is required. In these situations, ITU-T Recommendation E.123 suggests to list the area code in parentheses, signifying that in some cases the area code is optional or may not be required.

Internationally, an area code is typically prefixed by a domestic trunk access code (usually 0) when dialing from inside a country, but is not necessary when calling from other countries there are exceptions, such as for Italian land lines.

To call a number in Sydney, Australia, for example:

  • xxxx xxxx (within Sydney and other locations within New South Wales and the Australian Capital Territory - no area code required)
  • (02) xxxx xxxx (outside New South Wales and the Australian Capital Territory, but still within Australia - the area code is required)
  • +61 2 xxxx xxxx (outside Australia)

The plus character (+) in the markup signifies that the following digits are the country code, in this case 61. Some phones, especially mobile telephones, allow the + to be entered directly. For other devices the user must replace the + with the international access code for their current location. In the United States, most carriers require the caller to dial 011 before the destination country code. [5]

New Zealand has a special-case dial plan. While most nations require the area code to be dialed only if it is different, in New Zealand, one needs to dial the area code if the phone is outside the local calling area. For example, the town of Waikouaiti is in the Dunedin City Council jurisdiction, and has phone numbers (03) 465 7xxx. To call the city council in central Dunedin (03) 477 4000, residents must dial the number in full, including the area code, even though the area code is the same, as Waikouaiti and Dunedin lie in different local calling areas (Palmerston and Dunedin, respectively.) [6]

In many areas of the NANP, the domestic trunk code (long-distance access code) must also be dialed along with the area code for long-distance calls even within the same numbering plan area. For example, to call a number in Regina in area code 306 (Regina and the rest of the province of Saskatchewan are also served by the overlay code 639):

  • 306 xxx xxxx — within Regina, Lumsden and other local areas
  • 1 306 xxx xxxx — within Saskatchewan, but not within the Regina local calling area, e.g., Saskatoon
  • 1 306 xxx xxxx — anywhere within the NANP outside Saskatchewan

In many parts of North America, especially in area code overlay plans, dialing the area code, or 1 and the area code, is required even for local calls. Dialing from mobile phones does not require the trunk code in the US, although it is still necessary for calling all long-distance numbers from a mobile phone in Canada. Many mobile handsets automatically add the area code of the set's telephone number for outbound calls, if not dialed by the user.

In some parts of the United States, especially northeastern states such as Pennsylvania served by Verizon Communications, the ten-digit number must be dialed. If the call is not local, the call fails unless the dialed number is preceded by digit 1. Thus:

  • 610 xxx xxxx — local calls within the 610 area code and its overlay (484), as well as calls to or from the neighboring 215 area code and its overlay, 267. Area code is required one of two completion options for mobile phones within the U.S.
  • 1 610 xxx xxxx — calls from numbers outside the 610/484 and 215/267 area codes second of two completion options for mobile phones within the U.S.

In California and New York, because of the existence of both overlay area codes (where an area code must be dialed for every call) and non-overlay area codes (where an area code is dialed only for calls outside the subscriber's home area code), "permissive home area code dialing" of 1 + the area code within the same area code, even if no area code is required, has been permitted since the mid-2000s. For example, in the 559 area code (a non-overlay area code), calls may be dialed as 7 digits (XXX-XXXX) or 1-559 + 7 digits. The manner in which a call is dialed does not affect the billing of the call. This "permissive home area code dialing" helps maintain uniformity and eliminates confusion given the different types of area code relief that has made California the nation's most "area code" intensive State. Unlike other states with overlay area codes (Texas, Maryland, Florida and Pennsylvania and others), the California Public Utilities Commission and the New York State Public Service Commission maintain two different dial plans: Landlines must dial 1 + area code whenever an Area Code is part of the dialed digits while cellphone users can omit the "1" and just dial 10 digits.

Many organizations have private branch exchange systems which permit dialing the access digit(s) for an outside line (usually 9 or 8), a "1" and finally the local area code and xxx xxxx in areas without overlays. This aspect is unintentionally helpful for employees who reside in one area code and work in an area code with one, two, or three adjacent area codes. 1+ dialing to any area code by an employee can be done quickly, with all exceptions processed by the private branch exchange and passed onto the public switched telephone network.

Full-number dialing

In small countries or areas, the full telephone number is used for all calls, even in the same area. This has traditionally been the case in small countries and territories where area codes have not been required. However, there has been a trend in many countries towards making all numbers a standard length, and incorporating the area code into the subscriber's number. This usually makes the use of a trunk code obsolete. For example, to call someone in Oslo in Norway before 1992, it was necessary to dial:

  • xxx xxx (within Oslo - no area code required)
  • (02) xxx xxx (within Norway - outside Oslo)
  • +47 2 xxx xxx (outside Norway)

After 1992, this changed to a closed eight-digit numbering plan, e.g.:

However, in other countries, such as France, Belgium, Japan, Switzerland, South Africa and some parts of North America, the trunk code is retained for domestic calls, whether local or national, e.g.,

    01 xx xx xx xx (outside France +33 1 xxxx xxxx) 02 xxx xxxx (outside Belgium +32 2 xxx xxxx) 022 xxx xxxx (outside Switzerland +41 22 xxx xxxx) 021 xxx xxxx (outside South Africa +27 21 xxx xxxx) 1 212 xxx xxxx (outside the North American Numbering Plan +1 212 xxx xxxx) 092 xxx xxxx (outside the Japanese Numbering Plan +81 92 xxx xxxx) "0-10 Digit Number" (outside India +91 XXXXXXXXXX). In India due to the availability of multiple operators, the metro cities have short codes which range from 2 to 8 digits.

While some, like Italy, require the initial zero to be dialed, even for calls from outside the country, e.g.,

While dialing of full national numbers takes longer than a local number without the area code, the increased use of phones that can store numbers means that this is of decreasing importance. It also makes it easier to display numbers in the international format, as no trunk code is required—hence a number in Prague, Czech Republic, can now be displayed as:

as opposed to before September 21, 2002: [7]

Some countries already switched, but trunk prefix re-added with the closed dialing plan, for example in Bangkok, Thailand before 1997:

  • xxx-xxxx (inside Bangkok)
  • 02-xxx-xxxx (inside Thailand)
  • +66 2-xxx-xxxx (outside Thailand)

Trunk prefix was re-added in 2001

The E.164 standard of the International Telecommunications Union is an international numbering plan and establishes a country calling code (country code) for each member organization. Country codes are prefixes to national telephone numbers that denote call routing to the network of a subordinate number plan administration, typically a country, or group of countries with a uniform numbering plan, such as the NANP. E.164 permits a maximum length of 15 digits for the complete international phone number consisting of the country code, the national routing code (area code), and the subscriber number. E.164 does not define regional numbering plans, however, it does provide recommendations for new implementations and uniform representation of all telephone numbers.

Within the system of country calling codes, the ITU has defined certain prefixes for special services and assigns such codes for independent international networks, such as satellite systems, spanning beyond the scope of regional authorities.

Satellite telephone systems

Satellite phones are usually issued with numbers with a special country calling code. For example, Inmarsat satellite phones are issued with code +870, while Global Mobile Satellite System providers, such as Iridium, issue numbers in country code +881 ("Global Mobile Satellite System") or +882 ("International Networks"). Some satellite phones are issued with ordinary phone numbers, such as Globalstar satellite phones issued with NANP telephone numbers.

  • Inmarsat: +870: SNAC (Single Network Access Code) : +881 0, +881 1
  • Ellipso: +881 2, +881 3 : +881 6, +881 7 : +881 8, +881 9
  • Emsat: +882 13 : +882 16 : +882 20

Special services

Some country calling codes are issued for special services, or for international/inter regional zones.

  • +388 5 – shared code for groups of nations
  • +388 3 – European Telephony Numbering Space – Europe-wide services (discontinued)
  • +800 – International Freephone (UIFN)
  • +808 – reserved for Shared Cost Services
  • +878 – Universal Personal Telecommunications services
  • +881 – Global Mobile Satellite System
  • +882 and +883 – International Networks
  • +888 - international disaster relief operations
  • +979 – International Premium Rate Service
  • +991 – International Telecommunications Public Correspondence Service trial (ITPCS)
  • +999 – reserved for future global service

The numbering plan indicator (NPI) is a number which is defined in the ITU standard Q.713, paragraph, indicating the numbering plan of the attached telephone number. NPIs can be found in Signalling Connection Control Part (SCCP) and short message service (SMS) messages. As of 2004 [update] , the following numbering plans and their respective numbering plan indicator values have been defined:

NPI Description Standard
0 unknown
1 ISDN Telephony E.164
2 generic
3 data X.121
4 telex F69
5 maritime mobile E.210 and E.211
6 land mobile E.212
7 ISDN/mobile E.214

Like a public telecommunications network, a private telephone network in an enterprise or within an organizational campus may implement a private numbering plan for the installed base of telephones for internal communication. Such networks operate a private switching system or a private branch exchange (PBX) within the network. The internal numbers assigned are often called extension numbers, as the internal numbering plan extends an official, published main access number for the entire network. A caller from within the network only dials the extension number assigned to another internal destination telephone.

A private numbering plan provides the convenience of mapping station telephone numbers to other commonly used numbering schemes in an enterprise. For example, station numbers may be assigned as the room number of a hotel or hospital. Station numbers may also be strategically mapped to certain keywords composed from the letters on the telephone dial, such as 4357 (help) to reach a help desk.

The internal number assignments may be independent of any direct inward dialing (DID) services provided by external telecommunication vendors. For numbers without DID access, the internal switch relays externally originated calls via an operator, an automated attendant or an electronic interactive voice response system. Telephone numbers for users within such systems are often published by suffixing the official telephone number with the extension number, e.g., 1-800-555-0001 x2055.

Some systems may automatically map a large block of DID numbers (differing only in a trailing sequence of digits) to a corresponding block of individual internal stations, allowing each of them to be reached directly from the public switched telephone network. In some of these cases, a special shorter dial-in number can be used to reach an operator who can be asked for general information, e.g. help looking up or connecting to internal numbers. For example, individual extensions at Universität des Saarlandes can be dialed directly from outside via their four-digit internal extension +49-681-302-xxxx, whereas the university's official main number is +49-681-302-0 [8] (49 is the country code for Germany, 681 is the area code for Saarbrücken, 302 the prefix for the university).

Callers within a private numbering plan often dial a trunk prefix to reach a national or international destination (outside line) or to access a leased line (or tie-line) to another location within the same enterprise. A large manufacturer with factories and offices in multiple cities may use a prefix (such as '8') followed by an internal routing code to indicate a city or location, then an individual four- or five-digit extension number at the destination site. A common trunk prefix for an outside line on North American systems is the digit 9, followed by the outside destination number.

Additional dial plan customisations, such as single-digit access to a hotel front desk or room service from an individual room, are available at the sole discretion of the PBX owner.


  1. Minoru

    I will not speak on this topic.

  2. Galrajas

    Bravo, excellent idea and is duly

  3. Fahd

    I know that it is necessary to do)))

  4. Regenweald

    This gorgeous phrase will come in handy.

Write a message