Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: indoor manager support #95

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ambientlight
Copy link
Member

@ambientlight ambientlight commented Apr 21, 2021

Adds support for Azure Map Creator Indoor Manager plugin.

Sample usage:

const tilesetId = "YOUR_TILESET_ID"

const options = {
  authOptions: {
    authType: "subscriptionKey",
    subscriptionKey: "YOUR_PRIMARY_SUB_KEY",
  },

  center: [-122.13203, 47.63645],
  zoom: 19,
  style: 'Grayscale_light',
  view: 'Auto'
};

const DefaultMap = () => (
  <AzureMapsProvider>
    <div style={{ height: '100vh', margin: 0 }}>
      <AzureMap options={options}>
        <AzureMapIndoorManagerProvider 
          options={{ 
            tilesetId, 
            theme: 'dark',
            levelControl: { position: 'top-right' }}}
          events={{
            facilitychanged: eventData => console.log(eventData),
            levelchanged: eventData => console.log(eventData)
          }}
        />
      </AzureMap>
    </div>
  </AzureMapsProvider>
);

export default DefaultMap;

Unit tests and example in examples repo are pending.

Additional notes:
Since the conversion of cad file (.dwg) to tileset consists of multiple REST api calls (described at tutorial-creator-indoor-maps), I have added a shell script to simplify this for the simple usecase: upload_indoor.sh , example .dwg .zip bundle can be found at Azure-Samples/am-creator-indoor-data-samples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant