![]() ![]() Retrieve the data source from the drawing manager. The shape(s) you want to add to the drawing manager so To add shapes to the drawing manager so the end user can view and edit, but don't want to programmatically put them into edit mode, retrieve the data source from the drawing manager and add your shapes to it. If the shape was previously in another data source, it will be removed from that data source. When a shape is passed into the edit function of the drawing manager, it is added to the data source maintained by the drawing manager. Then add loaders to the module rules portion of the Webpack config: module.exports = ) Inside your source file, import : import "azure-maps-drawing-tools/dist/" To begin, install style-loader and css-loader: npm install -save-dev style-loader css-loader For Webpack, it's commonly done via a combination of style-loader and css-loader with documentation available at style-loader. If you're using a JavaScript bundler to bundle the dependencies and package your code, refer to your bundler's documentation on how it's done. You would also need to embed the CSS for various controls to display correctly. Then, import the JavaScript in a source file: import * as drawing from "azure-maps-drawing-tools" This package also includes TypeScript definitions. Or, you can load the drawing tools module for the Azure Maps Web SDK source code locally by using the azure-maps-drawing-tools npm package, and then host it with your app. Add reference to the JavaScript and CSS in the element of the file: ![]() Use the globally hosted, Azure Content Delivery Network version of the Azure Maps services module. Load the Azure Maps drawing tools module.Create a new HTML file and implement the map as usual.Loading the drawing tools module in a webpage You can also use the built-in DrawingToolbar class. It can be used directly, and it's integrated with a custom toolbar UI. The drawing manager provides all the capabilities needed to draw and edit shapes on the map. The core class of this module is the drawing manager. This module makes it easy to draw and edit shapes on the map using an input device such as a mouse or touch screen. The Azure Maps Web SDK provides a drawing tools module. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |