Thread Tools Display Modes
08/10/15, 12:42 PM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
[outdated] Map Scale and Offset

Please add a function to the API that returns the position, scale and zone index of a map, relative to the Tamriel Map. The values should be in the same normalized coordinate space that is returned by all API functions.

Code:
(number)offsetX, (number)offsetY, (number)scaleX, (number)scaleY, (number)zoneIndex = GetCurrentMapMeasurements()
In LibGPS we try to emulate this by using the current player position and the PingMap function which sets a waypoint that is on the same position across all maps. This generally works, but it would be a lot simpler and make it much more stable if there was a nice API method that returned these infos that already should be known to the client anyways.

In addition please consider making g_mapPinManager and g_mapPanAndZoom in worldmap.lua globally accessible in order to avoid having to intercept them to modify pins or focus on a map position.

EDIT: Or just add the two methods that LibGPS is about:
Lua Code:
  1. localX, localY = GlobalToLocalPosition(globalX, globalY) -- takes a normalized position on the Tamriel map and returns the normalized position on the current map
  2. globalX, globalY = LocalToGlobalPosition(localX, localY) -- takes a normalized position on the current map and returns the normalized position on the Tamriel map
The position should also be allowed to be outside of [0, 1] because Coldharbour is outside of the Tamriel map.

Last edited by sirinsidiator : 08/10/15 at 12:52 PM.
 
08/10/15, 01:01 PM   #2
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by sirinsidiator View Post
EDIT: Or just add the two methods that LibGPS is about:
Lua Code:
  1. localX, localY = GlobalToLocalPosition(globalX, globalY) -- takes a normalized position on the Tamriel map and returns the normalized position on the current map
  2. globalX, globalY = LocalToGlobalPosition(localX, localY) -- takes a normalized position on the current map and returns the normalized position on the Tamriel map
I second this, that would be awesome not having to mess with the waypoint which is a pain for both LibGPS & other addons trying to use the waypoint.
 
08/11/15, 12:25 PM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
I second this, too.
Maybe a function analog to GetMapInfo:
zoneName, textureFile, offsetX, offsetY, scaleX, scaleY = GetZoneInfo(zoneIndex)

@ZOS:
If you feel uncomfortable with spoilers about zone locations:
It would be ok for me, if the return values are valid for always reachable world map sub-/zones and the zone the player/group is currently in, only.
 
08/19/15, 06:59 AM   #4
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Speaking of coordinate scales, I would also want to get a true current map size in meters .
 

ESOUI » Developer Discussions » Wish List » [outdated] Map Scale and Offset


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off