Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - 2012

Pages: [1] 2 3
Maps / Re: Via Michelin maps - possible to add to Locus?
« on: September 02, 2019, 17:30:51 »
If you think user scripts for this purpose would be interesting, you can take a look at this idea I added to Locus Help Desk (and vote for it if you like):

Maps / Re: Via Michelin maps - possible to add to Locus?
« on: September 02, 2019, 17:11:46 »
I haven't looked at this in many years. It's cool seeing what you guys have done since then.

I think the map/tiles that j3rry would like to see is the one I originally set out to try and get into Locus, and all the early posts (from way back in 2012) of this thread are about how to access those tiles properly.
I also think, like jusc, that Locus (still) does not have the capability to handle this type of tile URLs directly. The script for Mobac by Nicolas P seems very nice, I have not tested it.

I still wish we could handle this in Locus, and with proper geo-alignment. It would be very nice if Locus could support some kind of user scripts to handle this type of issues, and we could seamlessly integrate many more tile servers.

Some more information, this seems WMTS based. I don't know much about WMTS though, but Locus didn't accept the URL when I tried it in the WMS (sic) "add source link manually" dialog.

There is a redirection function where the (A) URLs below redirect to a tile at the respective (B) URLs. The example URLs form a 2x2 grid which I have marked with NW/SW/NE/SE. The zoom level identifier for these tiles was 707a0e89c7a346cfbe522572b1bdfd6d.

(A) https://api.[provider].net/maps/[map id]/wmts/tiles/[zoom level identifier]/2/0
(B) https://[provider][map id]/[zoom level identifier]/0/2048/1024/1024

(A) https://api.[provider].net/maps/[map id]/wmts/tiles/[zoom level identifier]/2/1
(B) https://[provider][map id]/[zoom level identifier]/1024/2048/1024/1024

(A) https://api.[provider].net/maps/[map id]/wmts/tiles/[zoom level identifier]/3/0
(B) https://[provider][map id]/[zoom level identifier]/0/3072/1024/1024

(A) https://api.[provider].net/maps/[map id]/wmts/tiles/[zoom level identifier]/3/1
(B) https://[provider][map id]/[zoom level identifier]/1024/3072/1024/1024

Still the reference system is just local unless the "zoom level identifier" provides more information than I can get out of it, so I'm just as stuck as before.

I am trying to set up a custom <provider> for maps with small local coverage. It uses a tile URL structure that I am not used to, despite having successfully added a lot of custom providers before. I am grateful for any help or insight.

The tiles are stored on as 1024x1024 PNGs, like this:
https://[provider name][map id]/[32 digit hexadecimal, seemingly random(?!), zoom level identifier]/[number representing X position]/[number representing Y position]/1024/1024
(no file extension)

Zoom level identifiers are different for every map. For one map, from far out to close, they are:

To further illustrate the naming, this is a 3x3 grid of tiles with everything up to and including the zoom level identifier ("707a0e89c7a346cfbe522572b1bdfd6d") cut off:
[...]/3072/2048/1024/1024 [...]/4096/2048/1024/1024 [...]/5120/2048/1024/1024
[...]/3072/3072/1024/1024 [...]/4096/3072/1024/1024 [...]/5120/3072/1024/1024
[...]/3072/4096/1024/1024 [...]/4096/4096/1024/1024 [...]/5120/4096/1024/1024

This is a 2x2 grid of tiles on the next (closer) zoom level ("56918450a00a49fbb5a3e3e290511ebd"):
[...]/9216/7168/1024/1024 [...]/10240/7168/1024/1024
[...]/9216/8192/1024/1024 [...]/10240/8192/1024/1024

The tile reference system for every zoom level seems to start in the (local) top left corner at [...]/0/0/1024/1024 and then the X and Y position indicators increase by 1024 for every tile (becoming rather large numbers in the bottom right at closer zoom levels).

I can live with creating a unique provider ID/"map" for every zoom level, which seems necessary? However, even with that I can't see how I could get the rest of the <url> code right.

I can find my way around the reference system without much difficulty, using multiples of 1024. But since the tile indicators are just related to the upper right corner of the local map, not to any global system, how can Locus know where to look for a specific tile? Could the "overall" position be part of the 32 digit hexadecimal number somehow?

Have you seen this before? Do you have any suggestion on how to wrap this into a Locus custom <provider>?

Thanks for your response and suggestion. I will try MAPC2MAPC as you suggest and see how that works for me!


I have a map from a custom map source that I would like to view in a 3D map environment like Google Earth (pro) on Windows (or Android, but I think that is much harder if at all possible?). I am already using it as an overlay with other maps in Locus, and have downloaded it as a personal SQL map.

I have seen people doing similar things (external overlay maps shown as clinging-to-ground in Google Earth) with a service called CalTopo ( They add a custom layer with the map URL (similar to Locus custom map sources) and then if you are a paid subscriber to the service you can get a live link to a Super-Overlay ( KML file (served on the site) which can be added to Google Earth to serve up layer tiles. (see example images at But I don't know if this program could really do what I want, I would much rather have a local file that I could add to Google Earth. And also I would rather not mess around with other programs since I like Locus so much. :)

Is it possible to export a saved map to KMZ to open in Google Earth? Would it otherwise be an idea for future functionality for Google Earth integration? Or is there some better way to do this? (Long-time wish is of course 3D display support in Locus, but that is another feature request/wish already. ;D)

Here are some more example images using CalTopo to show the Strava (no longer possible for detailed zooms after Strava requiring login!), just to show what things can look like in Google Earth:

Troubles & Questions / Re: Trouble with Swedish WMS maps
« on: March 29, 2019, 00:52:17 »
OK, further testing reveals that apparently the WMS maps work fine with every other "background" map except the first one I tried. Good news I guess! :)

The one with problems is the Swedish Lantmäteriet Topo map, available in Locus shop. I notice that it has the flag for "does not allow overlays" set, seems there is a good reason for that. A shame though, it's a very good map.

Sorry to bother you!

Troubles & Questions / Trouble with Swedish WMS maps
« on: March 28, 2019, 23:26:16 »

There are some Swedish government provided WMS maps for bike routes that I would like to use in Locus.

All technical information about them is available from here:

They are used for presentation in several formats on different pages of this site:

I am able to add the WMS versions in Locus with these URLs:  (background map of Sweden and northern Europe)  (data available in a large area around Gothenburg, Sweden)  (data available in a large area around Stockholm, Sweden)

As far as I can see they are WMS version 1.3.0 which as far as I understand is supported by Locus Pro.

(WMTS versions give errors when I try to add them, as I expected.)

When I use them in Locus they are (as expected) overlaid a background map. The bicycle view maps look good, the background map seems to scale wrongly in some way and looks quite "pixely".

The real problem starts when I want to move the map view around, the WMS overlay moves at another speed scale than the background layer map, creating an unintended "parallax" effect. Very cool to look at but very difficult to use as a map. :)

Something seems wrong with the scaling of these maps. Is the error on the server side, or is it Locus that does not handle them properly? Or is it something I could fix with settings/customization?

I've also been playing around with trying to add the WMTS versions as "normal" custom online maps through XML using provider URLs as examplified below, but I can't get them to work properly and I don't think it is possible really?
Code: [Select]{z}&TILEROW={y}&TILECOL={x}&FORMAT=image%2Fpng%3B%20mode=8bit

Troubles & Questions / Re: Provider id of non-custom map?
« on: March 22, 2019, 13:29:52 »
I understand, no problem! It is important that relations with map providers are good.

But now at least I know it's not just because I'm not looking hard enough. :)

Troubles & Questions / Provider id of non-custom map?
« on: March 22, 2019, 12:08:50 »
I would like to set an online overlay layer that i define in custom/providers.xml together with the Basemap Satellite map that is free in Locus store. If I had the provider id of the Basemap Satellite map I think I could do this with setting the background property for my map to that id. But how can I find out the provider id of a non-custom map?
I know I can let the user manually set my overlay layer as overlay and the other map as (background) map, but that is not really what I want to do.
Is this possible?

I use providers.xml for custom online maps. They work fine.

However, for the <mode> string I want to enter words with special characters (åäöÅÄÖ etc) for display in the maps selection interface.

I use the "<?xml version="1.0" encoding="UTF-8"?>" string in the first line for my xml file.

If I just write the mode strings without any explicit encoding, ("<mode>Björnbärstårta</mode>"), Lotus displays a garbage character where the special characters are supposed to be (like "Bj□rnb□rst□rta").
If I write them with UTF-8 encoding(?) like "<mode>Bj\xC3\xB6rnb\xC3\xA4rst\xC3\xA5rta</mode>", Lotus shows the encoded string as written with slashes and all. I am really unsure if this is how it is supposed to be done, I'm better at maps than strings. :)

How should I do it properly?

Troubles & Questions / Re: Google My Maps - what is the status
« on: March 31, 2015, 11:09:23 »
I don't want to bug you about this, just add some information that could be useful for you or someone else reading this.

The way to interact with "new" My Maps, rather than a "proper" API, is through KML files, see (updated March 19, 2015). So, as described in my previous post, to have data from a My Maps map I can have a KML/KMZ link URL like which is continually updated with current data from the My Maps map (after I have created the link). In the same (but opposite) way, My Maps data can be updated through a KML/KMZ file. There is information on what KML data is supported at and what is not supported at

For just viewing/keeping-updated My Maps data, no special permissions is needed for a third-party app, just the ability to parse the network link KML. For data going in the other direction however I think that Google account/permissions handling would be necessary, though I have not tried doing this programmatically.

(On the future of My Maps support, in the week-old version of Google's Maps app for Android they added viewing of My Maps maps. I really think this is yet an indication that they are putting their support behind the current My Maps platform.)

Troubles & Questions / Re: Google My Maps - what is the status
« on: March 26, 2015, 22:21:03 »
Thanks for your answer menion, you are always very quick to answer questions on the forums, it is much appreciated!

Information on Locus pages
The Locus [pro] app pages on Play store are very clear on "Integration of Google My Maps (reading and editing)" as a feature, I think it needs to be removed to not confuse users. I think there is no info on the actual homepage, except that info in the docs knowledge base which I linked to.

(new) My Maps support suggestion
Latest news from Google on the situation, AFAIK, is at and I must say that with the "new My Maps" (formerly Google Maps Engine Lite) things have been working very smoothly with (non-Locus) My Maps use for me. I have no idea of their API plans though (but read on), but I hope to see Locus integrate with (new) My Maps now that Google (seems to) have decided on which path to follow. My Maps makes it very easy to collaborate on and share map data, and also makes it accessible from a multitude of devices, I just wish I could combine it with Locus' powerful features in a better way than "import KMZ". You know that (new) My Maps provides a "network link" KMZ (see While this would not help editing it would be nice just to have a "live link" to a My Maps map, and be able to refresh data from My Maps with the click of a button, rather than doing the cumbersome KMZ exoprt+import. (It only works with public maps though.) Perhaps this could be something that would not require so much work (just "live" KMZ import from a URL, no Google account handling, no need for Google Play Services framework, no work with supporting editing features) but still provide great value for users? For me at least, editing features is not that important.

confused information concerning the deprecation of GME
From what I understand there is a lot of misunderstanding about the Google announcement. In the request thread you link to, you make a post linking to the quite unclear ZDnet article that started all this (, but if you read the comments there you will see that this announcement should not be interpreted as (new) My Maps being deprecated in any way. See MNorelli's post at for a bit of clearing up (eg "Nope. That's Google My Maps. That's not going away.  What is going away is Maps Engine, the Google platform that map professionals use to host and visualize lots of sets of data in a Google maps framework.", but read the rest of it too!). So this would not be wasted work on a soon-to-be-deprecated technology. For further corroboration you could see, "The move should be seen as Google transitioning customers to already existing alternative products, especially Google My Maps (formerly Maps Engine Lite) which has come of age and now has most of the important features of Google Maps Engine.". The mail form Google they refer to even suggests "[creating] a map using Google My Maps" as one of possible alternatives to work formerly being done with Google Maps Engine! The GIS users' communities also seems clear on this being an act of Google steering users over to the My Maps (for basic tasks) and Maps API (for the complex stuff).

Sorry for all the text. :(

Troubles & Questions / Google My Maps - what is the status
« on: March 26, 2015, 11:47:02 »
Hi, I've been using Locus for years, but it was a long time since I used the My Maps integration.

I've noted that My Maps / Maps Engine / ... handling has had some changes/problems over the years, but I also see on the Locus Pro page on Play store that it stil has "Integration of Google My Maps (reading and editing)".

However, I can't seem to find the my maps functionality in Locus 3.7.0. I see in the docs knowledge base that I am supposed to access it through Menu -> More -> My Maps, and this is also what I remember, but I can't find the My Maps section there. I also checked to see that the icon is not hidden.

What can I do to see my My Maps data (points with information) in Locus 3.7.0?

Maps / Re: Via Michelin maps - possible to add to Locus?
« on: April 03, 2013, 16:58:12 »
OK, I couldn't resist. :)

Here is ugly untested hack pseudo code, tell me if it works for you, I've probably messed up somewhere, just ask if it is unclear/faulty.

I think the algorithm could be done without recursion, but I couldn't think of a way right now, rusty programming/math skills.

Code: [Select]
urlstring(mapname,r,c) {
; mapname: fra_c_0185k_r061, ...
; r: row (1...n, positive integer, top to bottom)
; c: column (1...n, positive integer, left to right)
tile = rc2tile(r,c)
tileA = tile[0]
tileB = tile[1]
tilestring = tiles2string(tileA,tileB)
mapb64string = base64encode(mapname)
tileb64string = base64encode(tilestring)
return mapb64string + tileb64string

rc2tile(r,c) {
if (r=1 and c=1) {
A = 0
B = 0
else {
r2 = round(r/2)
c2 = round(c/2)
tile2 = rc2tile(r2,c2)
tile2A = tile2[0]
tile2B = tile2[1]
A = tile2B * 2 + ((c-1) mod 2))
B = tile2A * 2 + ((r-1) mod 2))
; note that the A/B switch above is intentional
return (A,B)

tiles2string(a,b) {
return repeat("0",10-p) + a + repeat("0",10-q) + b

; example use
geturl(; + urlstring(fra_c_0185k_r061,14,58))

; if you don't have mod/%/modulo available, use this:
mod(a,n) {
return a - (n * int(a/n)).
; and "X mod Y" above has to be rewritten as "mod(X,Y)"

Also note, here is some much simpler explanations of the matrix definition - still recursive, but without the totally unnecessary dec<->bin conversions I've used above:

In the "cell quading" way of above:
original cell:
child cells:
2B:2A   2B+1:2A
2B:2A+1 2B+1:2A+1

In quarter-the-matrix approach:
(made an error in this, might add later)

Or, reversely/recursively defined...

Every matrix cell has data in the form of x:y, the cells are referred to with M[r,c] where r=row and c=column.

for r=c=1:
M[1,1] = 0:0

for all other cases with r and c positive integers:
M[r,c](x) = M[round(r/2),round(c/2)](y)*2+((c-1) mod 2)
M[r,c](y) = M[round(r/2),round(c/2)](x)*2+((r-1) mod 2)

(recurses until first case reached)


Zoom levels with correpsonding "map names" would of course have to be set up by hand.
And then there is some work of aligning the tiles to the right geoposition, but the above pseudeocode should, barring mistakes, be enough to know how to call any specified tile in a map.

edit again
Corrected an obvious mistake in tiles2string pseudo code.

Pages: [1] 2 3