NetTalk WebServer - Using Maps in a Webserver Application
This document is for maps in Webserver apps.
For maps in Desktop apps see here.
NetTalk 8 introduced the MAP form field type. This means that a map can be
included onto a Form.
The map has some basic functionality (starting
position and so on). You can also add data to the map from your tables.
This data can be displayed as Markers on the map. Markers can be moved
by dragging them (and the underlying record will be updated). If you click
on a marker then the form for that marker appears.
Providers provide the Tile and/or Satellite images which underpin your map.
Through the magic of Leaflet you are able to easily change the provider
while maintaining the map functionality.
Please note that different
providers have different licensing terms of their own. It is critical that
you ensure that your application conforms to the terms of the Provider that
NetTalk contains support for several providers "built-in"
- however other providers supported by Leaflet can still be used. If you
would like support for a specific provider to be added to NetTalk please
The pricing and terms mentioned below are a guide and may
be inaccurate. Please check the provider's current terms carefully before
selecting a provider. It is likely that the data below will become
inaccurate over time as the providers change their terms.
The following providers are already supported;
is, as the name suggests, an Open-Source style collection of
map data. It is created and maintained by the community, and is of a very
Using the OpenStreetMap data directly from their
servers is discouraged (as per their
Tile Usage Policy.
) They are however the data
underpinning some of the providers below. So you won't use OSM directly,
rather, if you want to use the OpenStreetMaps data then you will use one
of the providers below that supports it.
As of July 2016
MapQuest requires a Developer ID to get started. You can register for an
The Free level allows for a number of free transactions per month,
after which some paid plans come into effect.
MapQuest provides both Free and Licensed access to their services. You can learn about the differences on their
Usage of the free (Community Edition) MUST comply with their
If you want to make use of the MapQuest data
then you will need an Application Key.
Users are able to switch between Map mode and Satellite mode at
Mapbox requires you to sign up to get a free developer key. You can
enter this ID on the Maps tab of the WebServer extension.
limits on free support, but paid support starts at $5 per month, and
includes satellite pictures. Their pricing, and feature set for each
level can be found at https://www.mapbox.com/plans/
Using Mapbox you can create multiple "projects" - each project has it's own ID code.
Different projects can have different styles and so on. You will need to create at
least one project to use it in your NetTalk app. Terrain style looks good.
Mapbox allows you to create your own custom maps, which can be
useful if you are mapping things other than the earth. For example you
may need a detailed map of a specific building, or campus, and this may
make this a good choice for that sort of use.
HERE Maps (formerly Nokia Maps, formerly OVI Maps)
requires you to sign up to get a free developer key. You can
enter this ID on the Maps tab of the WebServer extension.
there is a free tier, the
Terms and Conditions
on the usage of this tier are laid out very
explicitly. It is a good provider choice if your application conforms to
these terms and conditions.
Maps and Satellite images as well as a Hybrid mode which combines the
Maps rendered using a water color look. Can create a unique look for your app.
is free for development and testing, but requires you to use an
account when deploying in production. Their pricing plans can be found
Plans start from $20 per
In order to use Maps in your application, you need to set the following in the WebServer procedure;
Go to the NetTalk Extension, Settings Tab, Scripts tab and tick on the option Include Maps Script.
Go to the NetTalk Extension, Defaults Tab, Maps Tab, and select a Provider.
If you're not sure which Provider will be best for your application, then
use MapQuest - however you will need to select an appropriate provider at
You can add a map to your application by adding it as a Form-Field on a
form. If this is a Memory form, with no Save button then it in turn can be
included on other forms, or as the child of a browse.
The field to be
added is of type MAP and does not require a FIELD to be set. It does however
require a USE EQUATE. When a field is set to be a Map then the following
tabs are visible with additional information about the field;
- Map: This contains basic settings for the map, and also optionally
displays a "home" marker on the map.
- OnClick: Contains settings for what to do if the user clicks on the
map itself. A form can be called in Insert mode, and/or the map
co-ordinates can be copied into other fields on the form.
- Data: Multiple data sources can be added to the map.
The settings for the map are documented in the
Map data is stored as a pair of REAL values, containing the Latitude and Longitude of the data point.
The unit of measure is DEGREES, and both the Latitude and Longitude usually contain fractional values.
Latitude is measures in degrees North or South of the equator.
Negative values entered here are treated as South, positive values are treated as North.
Longitude is measures in degrees East or West of the Greenwich Meridian
(which goes through London, England). Negative values entered here are
treated as West, positive values are treated as East.
In addition you
may want to store the Zoom Value as a LONG. This can range from 1 ("seen
from space") to 16, which is "very close to the ground". Depending on the
nature of the data, you may want the user to set (and hence store) the Zoom
level which best suits the map.
Displaying Data on the Map
The basic map consists of a Tile Layer (the actual map drawing or satellite
picture) and data from the database.
A single map can contain multiple
sources of data.
Data on the map is usually represented by a Marker.
Data can be edited directly from the map, simply by clicking on the marker.
Markers can also be moved by dragging them around on the map. As the map
zooms out, Markers that are close together will be aggregated into a
A collection of Markers can form the boundary of an Area.
Inserting records by clicking on the Map
On the OnClick tab, for a map field, you can set an Insert Form that will be
called when the user clicks on the map.
The form that is called can
prime a number of fields, based on the current viewable map, and based on
the location which was clicked. This priming is done in the Insert Form, on
the Priming tab, on the From Maps tab.
[End of this document]