Interior Navigation Development Notes

Source: Internet
Author: User

Indooratlas Indoor Navigation How to use the iOS version:

Introduction of protocol Ialocationmanagerdelegate

Implementation method

-(void) Indoorlocationmanager: (ialocationmanager *) Manager didupdatelocations: (nsarray *) locations;

-(void) Indoorlocationmanager: (ialocationmanager *) Manager didenterregion: (iaregion *) region;

First, the "Didenterregion" method is used to obtain the region (iaregion)in region . Identifier stores the Floorplanid.

Use Iaresourcemanager and Floorplanid have access to the floorplan of the current floor ( Iafloorplan ). "Fetchfloorplanwithid"

You can also use the Fetchfloorplanimagewithid "Gets the picture of the current floor.

float scale = fmin ( 1.0fmin (weakself. View. Bounds. Size. Width/Floorplan. Width,  weakself. View. Bounds. Size. Height/Floorplan. Height

Scale to determine the magnification of the floor picture displayed on the screen

// Get the picture width to the ratio of the screen , take the small scale of the edge to zoom, the picture is larger than the screen and the zoom is set to the screen maximum

Use Cgaffinetransform The transformation of the Uiimageview

Weakself. ImageView. Transform = cgaffinetransformidentity;//Identity transformation equivalent to assigning an initial value

Cgaffinetransform t = cgaffinetransformmakescale(scale, scale);

Weakself. ImageView. transform=t; Zooming the picture

float size = floorplan. Metertopixelconversion;

The number of pixels accounted for 1 meters

eg:floorplan.metertopixelconversion=5 Then one meter corresponds to 5 pixels.

floorplan.pixeltometerconversion is the number of meters for a 1 pixel point namely 1/metertopixelconversion

Navigating the user point is a realistic case of a meter square using size Convert to size on picture

Interior navigation Development notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.