Saturday, 03 April 2021
  2 Replies
  114 Visits
0
Votes
Undo
  Subscribe

hi i have tried everything but maps are all greyed out   please help

2 weeks ago
·
#8101
0
Votes
Undo

As in: this worked before? Or didn't it ever?

What Geo Service are you using?

(I do not use TB for territories myself, but I have this test environment, and I seem to be having problems here as well)


https://www.theocbase.net/support-forum/post/1097-donations.html

For accessing the database my personal preference is http://sqlitebrowser.org/

For editing templates I like to use http://brackets.io/ 

 


one week ago
·
#8122
0
Votes
Undo

Hi Jay,

I made some tests and it neither works with an older TheocBase version anymore, so I guess the issue is related to the OSM service (maybe it is on holiday and will come back some day).

If you want to try to solve the problem yourself in the meantime, maybe the following information may help:

The html file contains the following code, which needs to be adjusted or replaced with s.th. that works (especially the red part):

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {

foo: 'bar',

attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'

}).addTo(map!TR_TERRITORY_NUMBER!);

According to the page https://leafletjs.com/examples/quick-start/, this can also be used (which requires a mapbox access token):

L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
    attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
    maxZoom: 18,
    id: 'mapbox/streets-v11',
    tileSize: 512,
    zoomOffset: -1,
    accessToken: 'your.mapbox.access.token'
}).addTo(map!TR_TERRITORY_NUMBER!);

Additionally also a WMS service can be used, e.g.:

L.tileLayer.wms('https://ows.terrestris.de/osm/service?', {

layers: 'OSM-WMS'}).addTo(map!TR_TERRITORY_NUMBER!);

 

or in grayscale:

L.tileLayer.wms('https://ows.terrestris.de/osm-gray/service?', {

layers: 'OSM-WMS'}).addTo(map!TR_TERRITORY_NUMBER!);

 

The preview in TheocBase did not look very nice, but the exported PDF was OK. Maybe you can check if there's a public WMS available for your area, e.g. from the government, which may even be better.

Greets,

Marlon

  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!