Scale values

171 views
Skip to first unread message
Assigned to iting...@gmail.com by me

Evgenii Rosсa

unread,
Feb 15, 2018, 3:49:54 AM2/15/18
to mapstore-users
Hi everyone.
What is the best way to predefine (static) scale values?


Regards,
Evghenii.

Mauro Bartolomeoli

unread,
Feb 15, 2018, 4:03:27 AM2/15/18
to mapstor...@googlegroups.com
Hi Eugenii,
you have to put a specific section in your map configuration file (if you save maps using the file manager you can change the new.json file and create a new map from that):

"map": {
    ...
    "mapOptions": {
      "view": {
        "resolutions": [
          84666.66666666688,
          42333.33333333344,
          21166.66666666672,
          10583.33333333336,
          5291.66666666668,
          2645.83333333334,
          1322.91666666667,
          661.458333333335000,
          529.166666666668000,
          396.875000000001000,
          264.583333333334000,
          132.291666666667000,
          66.145833333333500,
          39.687500000000100,
          26.458333333333400,
          13.229166666666700,
          6.614583333333350,
          3.968750000000010,
          2.645833333333340,
          1.322916666666670,
          0.661458333333335
        ]
      }
    },

Please note that:
 - custom resolutions are only supported by openlayers
 - I have just committed a fix to save mapOptions with your map, so this will only work with the master branch
 - scale = resolution * dpu where dpu = dpi * (100 / 2.54), where dpi = 96

Mauro



--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-users+unsubscribe@googlegroups.com.
To post to this group, send email to mapstore-users@googlegroups.com.
Visit this group at https://groups.google.com/group/mapstore-users.
For more options, visit https://groups.google.com/d/optout.

Evgenii Rosсa

unread,
Feb 16, 2018, 3:49:17 AM2/16/18
to mapstore-users
Thank you, Mauro.
Can you give me one more cue?
What is the best way to change default background maps in background selector?






Mauro Bartolomeoli

unread,
Feb 16, 2018, 4:03:02 AM2/16/18
to mapstor...@googlegroups.com
Hi Evgenii, same as above, using the new.json file you can change the list of layers with the "background" group. Those are the layers that will be listed in the background selector widget.

Mauro


Evgenii Rosсa

unread,
Feb 16, 2018, 4:38:39 AM2/16/18
to mapstore-users
Hi Evgenii, same as above, using the new.json file you can change the list of layers with the "background" group. Those are the layers that will be listed in the background selector widget.

Mauro

2018-02-16 9:49 GMT+01:00 Evgenii Rosсa <iting...@gmail.com>:
Thank you, Mauro.
Can you give me one more cue?
What is the best way to change default background maps in background selector?






--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To post to this group, send email to mapstor...@googlegroups.com.

Mauro Bartolomeoli

unread,
Feb 16, 2018, 5:10:29 AM2/16/18
to mapstor...@googlegroups.com
Hi Evgenii,
try using the attached new.json file.



To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-users+unsubscribe@googlegroups.com.
To post to this group, send email to mapstore-users@googlegroups.com.
new.json

Evgenii Rosсa

unread,
Feb 16, 2018, 6:06:31 AM2/16/18
to mapstore-users
Привет Мауро,
Thank you for examle file, but no changes takes effect after file replace.

пятница, 16 февраля 2018 г., 12:10:29 UTC+2 пользователь Mauro Bartolomeoli написал:
Привет, Евгений,
попробуйте использовать прикрепленный файл new.json.



2018-02-16 10:38 GMT + 01: 00 Евгений Роща < iting ... @ gmail.com > :
Привет Мауро,
Можете ли вы привести пример добавления новой карты
с моего сервера, ссылка на слой wmts:

http://185.108.182.146/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=orthophoto%3AOrtofoto_2016_RM&STYLE=&TILEMATRIXSET=EPSG%3A900913&FORMAT=image%2Fpng&HEIGHT=256&WIDTH=256&CRS=EPSG%3A900913&MAXNATIVEZOOM=18&AUTHKEY=9b738792-6f91-4278-9a51-f52099078377&tilematrix=EPSG:900913:8&tilerow=90&tilecol=146

пятница, 16 февраля 2018 г., 11:03:02 UTC+2 пользователь Mauro Bartolomeoli написал:
Hi Evgenii, same as above, using the new.json file you can change the list of layers with the "background" group. Those are the layers that will be listed in the background selector widget.

Mauro


2018-02-16 9:49 GMT+01:00 Evgenii Rosсa <iting...@gmail.com>:
Thank you, Mauro.
Can you give me one more cue?
What is the best way to change default background maps in background selector?






--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To post to this group, send email to mapstor...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapstore-users.
For more options, visit https://groups.google.com/d/optout.

-
Вы получили это сообщение, потому что подписались на группу «mapstore-users» группы Google.
Чтобы отказаться от подписки на эту группу и перестать получать от нее электронные письма, отправьте электронное письмо на адрес mapstore-user ... @ googlegroups.com .
Чтобы отправить в эту группу сообщение, отправьте письмо в mapstor ... @ googlegroups. com .
Посетите эту группу на странице https://groups.google.com/ group / mapstore .
Дополнительные параметры можно найти на странице https://groups.google.com/d/ optout .

Mauro Bartolomeoli

unread,
Feb 16, 2018, 6:43:48 AM2/16/18
to mapstor...@googlegroups.com
Hi Evgenii,
new.json is for new maps, it does not affect existing maps. Did you create a new map AFTER replace the file?

Mauro


To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-users+unsubscribe@googlegroups.com.
To post to this group, send email to mapstore-users@googlegroups.com.

Evgenii Rosсa

unread,
Feb 16, 2018, 7:27:03 AM2/16/18
to mapstore-users
Hi Mauro.
Thanks for your answer.
But is possible to change background in existing maps?

Mauro Bartolomeoli

unread,
Feb 16, 2018, 8:12:11 AM2/16/18
to mapstor...@googlegroups.com
Hi Evgenii,
no at the moment this is not possible on existing maps.

Mauro


--

Evgenii Rosсa

unread,
Feb 16, 2018, 10:11:00 AM2/16/18
to mapstor...@googlegroups.com
Hi Mauro.
I have mapstore connected to Postgresql.
I just tried to change may map record in gs_stored_data table and it is working... I can change/add/delete background maps selector.

And one more quastion: where background map icons must be defined?


Evgenii Rosсa

unread,
Feb 19, 2018, 9:34:11 AM2/19/18
to mapstore-users
Hi Mauro.
I am trying to change new.json file to create new map/
i added examle section after this code, but after that map api stops loading, i see only loading icon...

"map": {
"projection": "EPSG:900913",
"units": "m",
"center": {
      "x": 28.3788497854928,
      "y": 46.95495214805808,
      "crs": "EPSG:4326",
    "mapOptions": {
      "view": {
        "resolutions": [
...



четверг, 15 февраля 2018 г., 11:03:27 UTC+2 пользователь Mauro Bartolomeoli написал:
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To post to this group, send email to mapstor...@googlegroups.com.

Matteo Velludini

unread,
Feb 20, 2018, 3:21:50 AM2/20/18
to mapstor...@googlegroups.com
Hi,
Verify that is a valid json here: https://jsonlint.com
i believe center msut be closed before mapOptions
Cheers,
Matteo

To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-users+unsubscribe@googlegroups.com.
To post to this group, send email to mapstore-users@googlegroups.com.



--

Regards,

Matteo Velludini

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

==

Matteo Velludini

Software Engineer

 

GeoSolutions S.A.S.

Via di Montramito 3/A

55054  Massarosa (LU)

Italy

phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  333 8128928

 

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

 

-------------------------------------------------------

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Reply all
Reply to author
Forward
0 new messages