More

How to add new base layer to QGIS OpenLayers from Freemap server


I have a problem with adding a new layer to QGIS 2.6 OpenLayers and I need help. It is a source of maps www.freemap.sk

Examples of working with the server are:

http://wiki.freemap.sk/LayerAllInOne http://wiki.freemap.sk/TileDistributionTest

Now I created a file freemap.html in the directory:

~/.qgis2/python/plugins/openlayers_plugin/weblayers/html

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers FreeMap Layer <link rel="stylesheet" href="qgis.css" type="text/css"> <script src="OpenLayers.js"> <script src="OlOverviewMarker.js"> <script type="text/javascript"> var map; var loadEnd; var oloMarker; // OpenLayers Overview Marker function init() { map = new OpenLayers.Map('map', { theme: null, controls: [], // projection: new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:3857"), units: "m", maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34) }); loadEnd = false; function layerLoadStart(event) { loadEnd = false; } function layerLoadEnd(event) { loadEnd = true; } var osm = new OpenLayers.Layer.OSM( "FreeMapTuristika", "http://a.freemap.sk/T/${z}/${x}/${y}.png"> <div id="map"></div> </body> </html>

The problem is that QGIS does not open map:

While the browser opens fine:

When I watched the network traffic, I found that QGIS was sending erroneous requests to the server:

GET /T/1/0/-1.png"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="http://a.freemap.sk/core_allinone.php?/T/1/0/-1.png">here</a>.</p> </body></html> GET /core_allinone.php?/T/1/0/-1.png">
  1. Install quickmapservices plugin in QGIS.
  2. Open search panel (Web->QuickMapServices->Search QMS)
  3. Type freemap
  4. Push "Add button"

You can add your own services here: https://qms.nextgis.com/

Attention! The service has limits for zoom levels (8-16) and bounds.


Watch the video: How To Add OpenStreetMap And Google Satellite Imagery Base Map Layer In QGIS. Base Map. GeoFox (October 2021).