TransWikia.com

OpenLayers 3 ol.source.xyz set custom origin

Geographic Information Systems Asked by Hemal Gondaliya on June 11, 2021

I am using local tiles from my file system in OpenLayers 3 (ol.source.xyz), and my local tiles are stored as 0/0/0.png and so on. Now the thing is that when I use these tiles on my map it starts from the top left corner (0,0), instead of I want to set custom origin of my tiles, is there any way to change the origin (instead of 0,0, I want to use my own custom coordinates).

Here is my code:

enter image description here

2 Answers

you can use a custom tilegrid within your tile source configuration , and set the origin

api doc here

and example here

Answered by pavlos on June 11, 2021

Updated link as of 2021: api docs & example as a follow-up to @pavols answer above.

Answered by Philip Attisano on June 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP