### Local Development Setup Commands Source: https://developers.woosmap.com/js-samples/directions-simple These shell commands guide you through cloning the repository, installing dependencies, and starting the local development server for the sample. Ensure Git and Node.js are installed first. ```shell git clone -b sample/directions-simple https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Install Dependencies and Start Sample Source: https://developers.woosmap.com/js-samples/map-style-night Commands to clone the repository, install dependencies using npm, and start the sample application. This is for running the sample locally. ```shell git clone -b sample/map-style-night https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Local Development Setup Commands Source: https://developers.woosmap.com/js-samples/distance-isochrone Provides shell commands to clone the sample repository, install dependencies, and start the local development server. ```shell git clone -b sample/distance-isochrone https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Local Development Setup Commands Source: https://developers.woosmap.com/js-samples/geolocation-api These shell commands guide you through cloning a Git repository, installing Node.js dependencies, and starting a local development server for the sample application. This is essential for running the sample locally. ```shell git clone -b sample/geolocation-api https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Initial Sample Source: https://developers.woosmap.com/js-samples/localities-geocode Use these commands to clone the repository, install dependencies, and start the initial local sample. Ensure Git and Node.js are installed. ```shell git clone -b sample/localities-geocode https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Woosmap JS Samples Source: https://developers.woosmap.com/js-samples/localities-api-shape Clone the repository, install dependencies, and start the sample application. This is the initial setup for running any sample locally. ```shell git clone -b sample/localities-api-shape https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Local Setup Commands for Woosmap Samples Source: https://developers.woosmap.com/js-samples/localities-api-autocomplete These shell commands guide you through cloning the Woosmap JS samples repository, installing dependencies, and starting the local development server. It also shows how to switch to other sample branches. ```shell git clone -b sample/localities-api-autocomplete https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Clone and Run Initial Sample Source: https://developers.woosmap.com/js-samples/localities-js-widget Use these commands to clone the main sample repository, install its dependencies, and start the application. ```shell git clone -b sample/localities-js-widget https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Run Sample Locally Source: https://developers.woosmap.com/js-samples/marker-html-css Commands to clone the repository, install dependencies, and start the development server. ```shell git clone -b sample/marker-html-css https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Local Development Setup Commands Source: https://developers.woosmap.com/js-samples/store-locator-widget-events Provides the necessary terminal commands to clone the repository, install dependencies, and start the sample application locally. This setup is required before running the sample on your local machine. ```shell git clone -b sample/store-locator-widget-events https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Running Sample Project Locally Source: https://developers.woosmap.com/js-samples/store-locator-widget-custom-filters Commands to clone a sample project, install dependencies, and start the local development server. Use 'npm start' to run the sample. ```shell git clone -b sample/store-locator-widget-custom-filters https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Clone and Run Woosmap Sample Source: https://developers.woosmap.com/js-samples/map-style-lightgrey Clone the repository, navigate to the sample directory, install dependencies, and start the development server. ```shell git clone -b sample/map-style-lightgrey https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Initial Sample Source: https://developers.woosmap.com/js-samples/localities-autocomplete Use these commands to clone the main repository, navigate into the sample directory, install dependencies, and start the sample application. ```shell git clone -b sample/localities-autocomplete https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Run the Directions Advanced Sample Source: https://developers.woosmap.com/js-samples/directions-advanced Commands to clone the specific sample branch, install dependencies, and start the local development server. ```shell git clone -b sample/directions-advanced https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Specific Sample Source: https://developers.woosmap.com/js-samples/render-shapes-polylines Use these commands to clone the repository, navigate to a specific sample branch, install its dependencies, and start it. ```shell git clone -b sample/render-shapes-polylines https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Terminal Commands for Running Samples Source: https://developers.woosmap.com/js-samples/localities-api-details-postalcodes Commands to clone the repository, install dependencies, and start the development server. ```shell git clone -b sample/localities-api-details-postalcodes https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Clone and Run Initial Sample Source: https://developers.woosmap.com/js-samples/localities-js-api Use these commands to clone the main js-samples repository, navigate into the directory, install dependencies, and start the sample application. ```shell git clone -b sample/localities-js-api https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Woosmap JS Sample Source: https://developers.woosmap.com/js-samples/marker-click-event Clone a specific branch of the js-samples repository, install dependencies, and start the sample. Ensure Git and Node.js are installed. ```shell git clone -b sample/marker-click-event https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Terminal commands for running samples Source: https://developers.woosmap.com/js-samples/localities-api-autocomplete-advanced Commands to clone the repository, install dependencies, and start the development server for specific samples. ```bash git clone -b sample/localities-api-autocomplete-advanced https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```bash git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Clone and Run a Specific Woosmap Sample Source: https://developers.woosmap.com/js-samples/store-locator-widget-baidu Use these commands to clone the repository, navigate to the directory, install dependencies, and start the store-locator-widget-baidu sample. ```shell git clone -b sample/store-locator-widget-baidu https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run a Specific Sample Source: https://developers.woosmap.com/js-samples/draw-shapes Use these commands to clone the repository, install dependencies, and start the development server for the draw-shapes sample. ```shell git clone -b sample/draw-shapes https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Specific Sample Source: https://developers.woosmap.com/js-samples/geolocation-nearby-stores Use these commands to clone the repository, navigate to a specific sample branch, install its dependencies, and start the sample locally. ```shell git clone -b sample/geolocation-nearby-stores https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Sample Locally Source: https://developers.woosmap.com/js-samples/distance-matrix Provides shell commands to clone the sample repository, install dependencies, and start the local development server. ```shell git clone -b sample/distance-matrix https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Woosmap Sample Source: https://developers.woosmap.com/js-samples/render-shapes-data Use these commands to clone a specific Woosmap sample branch, install its dependencies, and start the local development server. ```shell git clone -b sample/render-shapes-data https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Terminal Commands for Running Samples Source: https://developers.woosmap.com/js-samples/react-map-with-localities Commands to clone, install dependencies, and start the React sample project or switch between different sample branches. ```bash git clone -b sample/react-map-with-localities https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```bash git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Clone and Run a Specific Woosmap Sample Source: https://developers.woosmap.com/js-samples/multisearch-address-form-autofill Use these commands to clone the repository, install dependencies, and start the multisearch address form autofill sample. ```Shell git clone -b sample/multisearch-address-form-autofill https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Woosmap JS Sample Source: https://developers.woosmap.com/js-samples/transit-roadbook Use these commands to clone the Woosmap JS samples repository, install dependencies, and start the sample application. ```Shell git clone -b sample/transit-roadbook https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Sample Locally Source: https://developers.woosmap.com/js-samples/store-locator-widget Commands to clone the Woosmap JS samples repository, navigate to the store locator widget sample directory, install dependencies, and start the development server. ```shell git clone -b sample/store-locator-widget https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run Woosmap Sample Source: https://developers.woosmap.com/js-samples/datasets-api Clone the js-samples repository, install dependencies, and start the sample application. This is the primary method for running Woosmap samples locally. ```Shell git clone -b sample/datasets-api https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run a Specific Woosmap Sample Source: https://developers.woosmap.com/js-samples/distance-matrix-advanced Use these commands to clone the repository, install dependencies, and start the development server for the distance matrix advanced sample. ```shell git clone -b sample/distance-matrix-advanced https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and Run a Specific Sample Source: https://developers.woosmap.com/js-samples/indoor-navigation-widget Use these commands to initialize the indoor navigation widget sample project. ```shell git clone -b sample/indoor-navigation-widget https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Example GET Request with Public API Key Source: https://developers.woosmap.com/products/indoor-api/features/feature-details An example of a GET request to the Get Feature Details endpoint, including the venue ID, feature ID, and a placeholder for your public API key. ```shell GET https://api.woosmap.com/indoor/venues/gdn_doc/pois/614309?key=YOUR_API_KEY ``` -------------------------------- ### Start Matrix Calculation Response Source: https://developers.woosmap.com/api-reference Example response received after successfully starting a matrix calculation. ```json { "matrix_id": "39585bfc-59cc-478c-9b87-12685c9b880c", "status": "accepted" } ``` -------------------------------- ### Autocomplete Request Example Source: https://developers.woosmap.com/products/indoor-api/features/autocomplete Example of a GET request to the Autocomplete API, including the venue ID, search query, and API key. ```shell GET https://api.woosmap.com/indoor/venues/gdn_doc/pois/autocomplete?query=bakery&key=YOUR_API_KEY ``` -------------------------------- ### Directions API Request Example Source: https://developers.woosmap.com/products/indoor-api/features/route An example GET request to the Directions API, specifying origin, destination, language, units, and API key. ```http GET https://api.woosmap.com/indoor/directions/gdn_doc? origin=43.6066,3.9218& origin_level=0& destination=ref:bakery001& destination_level=1& language=en& units=metric& key=YOUR_API_KEY ``` -------------------------------- ### Distance Matrix API Request Example Source: https://developers.woosmap.com/products/indoor-api/features/distance_matrix An example GET request to the Distance Matrix API, specifying origins, destinations, level, units, and API key. ```shell GET https://api.woosmap.com/indoor/distancematrix/gdn_doc? origins=43.6066,3.9218|ref:entrance001& destinations=ref:bakery001|ref:cafe002|ref:restroom003& level=1& units=metric& key=YOUR_API_KEY ``` -------------------------------- ### Clone and Run a Specific Sample Source: https://developers.woosmap.com/js-samples/indoor-widget-advanced Use these commands to clone the repository, install dependencies, and launch the indoor-widget-advanced sample. ```shell git clone -b sample/indoor-widget-advanced https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Localities Geocode Java OkHttpClient Example Source: https://developers.woosmap.com/products/localities/features/geocoding Example of making a GET request to the Localities Geocode API using OkHttpClient in Java. Sets up request body, headers, and executes the request. ```Java OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, ""); Request request = new Request.Builder() .url("https://api.woosmap.com/localities/geocode?address=Place%20Jeanne-d'Arc&components=country%3AFR&key=YOUR_PUBLIC_API_KEY") .method("GET", body) .addHeader("Referer", "http://localhost") .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Run Sample Locally Source: https://developers.woosmap.com/js-samples/indoor-map-advanced Shell commands to clone the repository and start the development server. ```shell git clone -b sample/indoor-map-advanced https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Switch to and Run Other Samples Source: https://developers.woosmap.com/js-samples/geolocation-nearby-stores After cloning the repository, use these commands to switch to a different sample branch, install its dependencies, and run it. ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Stores Nearby Geolocation Java OkHttpClient Example Source: https://developers.woosmap.com/products/geolocation-api/stores This Java example demonstrates how to use `OkHttpClient` to make a GET request for the closest store to a specific IP address. It executes the request and returns the response. ```java OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, ""); Request request = new Request.Builder() .url("https://api.woosmap.com/geolocation/stores?private_key=YOUR_PRIVATE_API_KEY&ip_address=173.79.254.254&limit=1") .method("GET", body) .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Stores Nearby Geolocation Ruby Net::HTTP Example Source: https://developers.woosmap.com/products/geolocation-api/stores This Ruby example uses the `Net::HTTP` library to fetch the closest store to a specified IP address. It makes a GET request and prints the response body. ```ruby require "uri" require "net/http" url = URI("https://api.woosmap.com/geolocation/stores?private_key=YOUR_PRIVATE_API_KEY&ip_address=173.79.254.254&limit=1") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) response = https.request(request) puts response.read_body ``` -------------------------------- ### Clone and Run a Specific Sample Source: https://developers.woosmap.com/js-samples/map-events Use these commands to clone the repository, install dependencies, and launch the map-events sample. ```shell git clone -b sample/map-events https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Get Feature by ID via cURL Source: https://developers.woosmap.com/api-reference Example request to retrieve a specific feature using its ID and a private API key. ```bash curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/497f6eca-6276-4993-bfeb-53cbbbba6f08?private_key=YOUR_PRIVATE_API_KEY' ``` -------------------------------- ### Get a Zone by ID using Java Source: https://developers.woosmap.com/products/stores-api/features/zones Example of fetching a zone by its ID using OkHttpClient in Java. Ensure you replace YOUR_PRIVATE_API_KEY. ```Java OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, ""); Request request = new Request.Builder() .url("https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY") .method("GET", body) .build(); Response response = client.newCall(request).execute(); ``` -------------------------------- ### Clone and run a specific Woosmap sample Source: https://developers.woosmap.com/js-samples/indoor-directions-service Use these commands to initialize the indoor directions service sample repository. ```shell git clone -b sample/indoor-directions-service https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Clone and run a specific Woosmap sample Source: https://developers.woosmap.com/js-samples/multisearch-js-api Use these commands to initialize the multisearch-js-api sample repository and start the local development server. ```shell git clone -b sample/multisearch-js-api https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Distance Matrix API Endpoint Examples Source: https://developers.woosmap.com/products/distance-api/features/matrix Demonstrates the base URLs for making GET and POST requests to the Distance Matrix API. ```http GET https://api.woosmap.com/distance/distancematrix/json POST https://api.woosmap.com/distance/distancematrix/json ``` -------------------------------- ### Authentication Examples (Query Parameters) Source: https://developers.woosmap.com/products/indoor-api/features/search Illustrates how to authenticate requests using either a public key for client-side or a private key for server-side operations. ```shell ?q=bakery&key=YOUR_PUBLIC_KEY ``` ```shell ?q=bakery&private_key=YOUR_PRIVATE_KEY ``` -------------------------------- ### Local Development Commands Source: https://developers.woosmap.com/js-samples/render-shapes-circles Provides shell commands to clone the repository, install dependencies, and start the sample application for local development. ```shell git clone -b sample/render-shapes-circles https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` ```shell git checkout sample/SAMPLE_NAME npm i npm start ``` -------------------------------- ### Clone and Run a Specific Woosmap Sample Source: https://developers.woosmap.com/js-samples/indoor-widget-simple Use these commands to clone the repository, install dependencies, and launch the indoor-widget-simple sample. ```Shell git clone -b sample/indoor-widget-simple https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Create Cordova Project Source: https://developers.woosmap.com/products/geofencing-sdk/cordova-plugin/guides/setup Initialize a new Cordova application. ```bash cordova create cd ``` -------------------------------- ### Clone and Run a Specific Sample Source: https://developers.woosmap.com/js-samples/infowindow-simple Use these commands to initialize a specific sample branch from the Woosmap repository. ```Shell git clone -b sample/infowindow-simple https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Get Dataset Status Response Source: https://developers.woosmap.com/api-reference Example JSON response for a successful dataset status check, detailing the import run ID, status, and steps. ```json { "id": "832eb97f-266c-4387-991d-52e77366dc99", "status": "success", "steps": [ { "end": "2024-06-07T09:30:48.356003", "entries": [ { "created_at": "2024-06-07T09:30:36.741569", "detail": "Fetching https://hostname.com/archive.zip...", "level": "info" }, { "created_at": "2024-06-07T09:30:48.103825", "detail": "Loading dataset...", "level": "info" }, { "created_at": "2024-06-07T09:30:48.351829", "detail": "Dataset loaded", "level": "info" } ], "name": "fetch", "start": "2024-06-07T09:30:36.715881", "status": "success" }, { "end": "2024-06-07T09:31:18.900746", "entries": [ { "created_at": "2024-06-07T09:30:48.366471", "detail": "Will import 34867 features.", "level": "info" }, { "created_at": "2024-06-07T09:31:18.785477", "detail": "Successfully imported 34867 features.", "level": "info" } ], "name": "import", "start": "2024-06-07T09:30:48.358285", "status": "success" } ] } ``` -------------------------------- ### JSON Response for Get Dataset Source: https://developers.woosmap.com/api-reference This is an example of a successful JSON response when retrieving a dataset. It includes details like ID, name, URL, and timestamps. ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "url": "http://example.com", "reimport_key": "69e26e49-d175-4cfc-b03c-773166cafab9", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "scheduled_for_deletion_after": "2019-08-24" } ``` -------------------------------- ### Clone and Run a Specific Woosmap Sample Source: https://developers.woosmap.com/js-samples/react-map-with-custom-overlay Use these commands to clone the repository, install dependencies, and launch the development server for a specific sample branch. ```shell git clone -b sample/react-map-with-custom-overlay https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Example: cURL Transit Route Request Source: https://developers.woosmap.com/products/transit-api/route-endpoint Use cURL to make a GET request to the Transit Route API. Include the Referer header as required. ```cURL curl -L -X GET 'https://api.woosmap.com/transit/route?origin=48.73534,2.368308&destination=48.83534,2.368308&key=YOUR_PUBLIC_API_KEY' \ -H 'Referer: http://localhost' ``` -------------------------------- ### Clone and Run a Specific Woosmap Sample Source: https://developers.woosmap.com/js-samples/stores-overlay-click-event Use these commands to clone the repository for the stores-overlay-click-event sample and launch the local development server. ```shell git clone -b sample/stores-overlay-click-event https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ``` -------------------------------- ### Build and Run Project Source: https://developers.woosmap.com/products/geofencing-sdk/cordova-plugin/guides/setup Compile and execute the application on the target platform. ```bash cordova build cordova run / ``` -------------------------------- ### Initialize and Run Localities API Sample Source: https://developers.woosmap.com/js-samples/localities-api-details Use these commands to clone the specific branch for the Localities API details sample and start the development server. ```shell git clone -b sample/localities-api-details https://github.com/woosmap/js-samples.git cd js-samples npm i npm start ```