= Features * Located in **[[Action/Download|Download Data]]**: Download arbitrary data (non-cropped at this time) in the `Download from MapWithAI API` tab -- ''note that you cannot download multiple MapWithAI layers'' * Located in **[[Menu/Data|data menu]]** * **MapWithAI: Download data**: Download MapWithAI data from the current download area (if more than one layer, a dialog will ask for a layer to be selected). This is dependent upon configured URLs (defaults to MapWithAI). * **MapWithAI: Download arbitrary data** ''([wikitr:/Help/ExpertMode expert mode] only)'': Download MapWithAI data inside an arbitrary bounding box, optionally cropping to the bounding box. The bounding box defaults to the current map view. This is also dependent upon configured URLs. * **MapWithAI: Add selected data**: Add the selected data from the MapWithAI data layer to a OSM Data Layer * **MapWithAI: Attempt to merge potentially duplicate ways** ''([wikitr:/Help/ExpertMode expert mode] only)'': Attempt to merge potentially duplicate ways. Done automatically for MapWithAI data, but is available for other uses (may or may not work as expected). * [#Remotecontrol Remote Control] * Upload Hooks * `mapwithai`: The count of OSM objects added and still present from the MapWithAI layer (splits and deletions may cause this to be inaccurate) * `mapwithai:options`: A semi-colon (`;`) separated list of non-default options * `version`: The version of the MapWithAI plugin. Added in case there is a severe bug so it can be blacklisted. * `task`: The bounding box for a task, if one is detected * `maxadd`: The maximum number of MapWithAI objects that are permitted to be added per operation. `<1` allows any number of objects to be added. * `url`: Shows non-default urls. Always the last `mapwithai:option`. * [/Styles/MapWithAI PaintStyle] * Automatically added by the plugin * Can be automatically toggled on/off with the `MapWithAI` layer (this requires the `MapWithAI` plugin) * Can show `new`, `modified`, or `pre-existing` MapWithAI data (depends upon the `source` tag). * Live counter of objects added with `MapWithAI` * [/wiki/Help/Preferences/Plugins Preferences] * Set MapWithAI url(s) * Choose whether or not MapWithAI automatically switches layers * Choose how many features you want to add per action * Choose whether or not to merge buildings with address nodes (note: this only applies to buildings that will have one ''and only one'' address inside it) * Change tags ''([wikitr:/Help/ExpertMode expert mode] only)'' that you want to be replaced. For example, `highway=residential` can become `disused:highway=road`. = Installation == Mandatory 1. see [[Help/Preferences/Plugins]] for details) == Paintstyle (Plugin should automatically add and enable it) 1. Start JOSM 2. Open JOSM Preferences 3. Go to `Map Settings` (the globe with a grid over it) 4. Go to `Map Paint Styles` 5. Add `MapWithAI` from the `Available style` list 6. Press OK = Usage == Basic Usage Please note that the screen shots were taken with `Expert Mode` checked in JOSM preferences. You may not see all the actions available without that check, the missing actions may be buggy or for a niche audience. 1. Download an area of interest (either through a tasking manager or through the standard download window) 2. Download data from MapWithAI by going to `Data` -> `MapWithAI: Download Data` (default keyboard shortcut is `ctrl` + `r` / `cmd` + `r`, will conflict with a `LiveGPSPlugin` shortcut). [[Image(GetData.png, alt=Download Data, center, 80%)]] 3. Switch to the `MapWithAI` layer if it is not already selected 4. Select an object or objects to add 5. Add the object by going to `Data` -> `MapWithAI: Add selected data` (default keyboard shortcut is `shift` + `a`) [[Image(SaveData.png, alt=Add selected data, center, 80%)]] == Advanced Usage === Preferences MapWithAI Preferences are currently under JOSM Preferences -> `Plugins` -> `MapWithAI`. ||= Preference =||= Explanation =||= Expert Mode =|| || API URLs || URLs for MapWithAI service (if blank, resets to default after JOSM restart) || no || || Automatically switch layers || if checked, when adding data switch layers automatically (default `yes`) || no || || Maximum features (add) || The maximum number of features that can be added from the MapWithAI Layer in one action (default `5`) || no || || Merge address nodes and buildings || Merges buildings added from the MapWithAI layer with building nodes (default `yes`) || no || || Table of replacement tags || Table of keys to replace (default is empty) || yes || The table of replacement tags tags `key` and `value` entries in the format of `key=TAG=VALUE` and `value=TAG=VALUE`, for example: [[Image(TagReplacement.png, alt=Add Tag, center, 80%)]] [[Image(MapWithAIPreferencePanel.png, alt=MapWithAI Preferences, center, 80%)]] === Remote control For current features, if JOSM is running with remote control enabled and the MapWithAI plugin is installed, you can go to http://localhost:8111/features?q=mapwithai . Remote control ''only'' affects the current MapWithAI layer. * Downloading data for current layers http://localhost:8111/mapwithai * Setting a bbox to download data http://localhost:8111/mapwithai?bbox=longitude1,latitude1,longitude2,latitude2 * Setting an arbitrary URL http://localhost:8111/mapwithai?url=STRING * Setting max objects to add in each action http://localhost:8111/mapwithai?max_obj=INT * Setting autoswitch layer http://localhost:8111/mapwithai?switch_layer=BOOLEAN * Setting a crop bbox http://localhost:8111/mapwithai?crop_bbox=longitude1,latitude1,longitude2,latitude2 = Building [https://gitlab.com/gokaart/JOSM_MapWithAI/wikis/Building-and-Testing Building and Testing]