Estimote / iOS-Indoor-SDK

Estimote Indoor SDK for iOS
MIT License
484 stars 136 forks source link

Convert CGPoint to ESTPoint #8

Closed sashakid closed 9 years ago

sashakid commented 9 years ago

Hi, guys, could someone tell me, is it possible to convert simple CGPoint to ESTPoint? For example, I have ESTPoint (2.5, 2.5), and for my instance of ESTIndoorLocationView it is the center of location (if its size is 5m X 5m). Also I have another object on screen but with coordinates relative to whole device's screen (self.view), for example, with CGPoint (170, 200). How can I translate point in context of screen to point in context of my location?

wiktor commented 9 years ago

Yup. ESTIndoorLocationView has exactly those methods that you are looking for.

See docs. Take a look at methods:

sashakid commented 9 years ago

@wiktor thanks, haven't found this method right away, but I've asked about translation in another direction, from screen point (for example (170, 200)) to 'location' point in meters (for example (1m, 2m)). Does SDK has such method?

Mycek commented 9 years ago

@sashakid In the latest SDK we heavily upgraded ESTIndoorLocationView and supported methods you were looking for (see docs)