Search
Tile Map Servers and Coordinates

Tile Map Services

MindFusion Mapping builds a map by concatenating map images returned by a Map Tile Service (MTS). There are many MTS servers available online, both paid and free,  a sample list is found on Wikipedia website: https://wiki.openstreetmap.org/wiki/Tile_servers. You assign your chosen server the urlTemplate property of a MapLayer instance. You can have unlimited number of MapLayer-s in a map and each MapLayer can use a different TMS provider.

Free TMS providers often require that you credit them. Use the attribution property to set the attribution text. The property supports HTML formatting symbols in its contents:

JavaScript  Copy Code

// create a map layer
var l = new m.MapLayer("Map");
l.urlTemplate = "http://d.tile.stamen.com/terrain/{z}/{x}/{y}.png";
l.attribution = 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a
href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a
href="http://openstreetmap.org">OpenStreetMap</a>, under <a
href="http://www.openstreetmap.org/copyright">ODbL</a>.';
view.layers.add(l);


When you've done customizing the map you need to call MapView.load and specify the location, which will appear in the center of the map and, optionally, the zoom factor.

JavaScript  Copy Code

view.load(new m.LatLong(52.523430, 13.411440), 12);


Coordinates

The map library uses the LatLong class to specify the geographical coordinates of objects. The class provides the latitude and longitude of a point. The values are both positive and negative: for latitude positive east of the 0-Meridian and negative west from it. For longitude - positive
north to the Equator and negative - south of it. Thus the coordinates of London, Sidney and New York will be:

JavaScript  Copy Code

var latLong_London = new m.LatLong(51.507351, -0.127758);
var latLong_Sidney = new m.LatLong(-32.658272, 152.152496);
var latLong_NewYork = new m.LatLong(40.712776, -74.005974);

Here is a sample service that will give you the geographical coordinates of locations around the globe in this manner: https://www.latlong.net/

The mapCenter property of the MapView provides you information of the current center of the map. The rectangle of the MapView control together with the mouse position are measured in standard JavaScript points. You can convert between the client coordinates and map coordinates with the  latLongToClient and clientToLatLong methods.

The location coordinates of Marker and Bubble instances also use LatLong values. The MapEventArgs class that provides data for the click and hover events also uses LatLong values for its location property.