diff --git a/README.md b/README.md index f272f99..17d7d03 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Dependency Status](https://david-dm.org/mendixlabs/google-maps.svg)](https://david-dm.org/mendixlabs/google-maps) [![Dev Dependency Status](https://david-dm.org/mendixlabs/google-maps.svg#info=devDependencies)](https://david-dm.org/mendixlabs/google-maps#info=devDependencies) [![codecov](https://codecov.io/gh/mendixlabs/google-maps/branch/master/graph/badge.svg)](https://codecov.io/gh/mendixlabs/google-maps) -![badge](https://img.shields.io/badge/mendix-7.6.0-green.svg) +![badge](https://img.shields.io/badge/mendix-7.9.0-green.svg) # Google Maps * Show locations on google maps @@ -12,6 +12,8 @@ * Show location on a map based on an coordinate * Show list of both addresses and coordinates on the map * Data sources Context, Static, XPath or Microflow +* Customize the display of the marker. If the marker can not be found from the custom markers. The widget will use + the specified custom markers else it will use the widget bundled marker. ## Limitations Context and static datasource are Offline capable with Mendix data, however still need to be online to see the map. @@ -21,7 +23,7 @@ from Google applies, especially for geocoding. We even advise geocoding your loc Mendix application and store them for later use as coordinates on the widget. ## Dependencies -Mendix 7.4 +Mendix 7.9.0 ## How it Works When displaying locations, the widget will prioritize coordinates over addresses.In the event that @@ -52,37 +54,18 @@ When the default center is not specified, the map will use the bounds center - On the `Data source` option of the `Data source` tab, select the `Microflow` option. - Specify the `Location entity` and the `Microflow` to retrieve the Map `locations` from (both required). + ### Appearance + - It is used to configure how the map responsively looks in relation to the container it is placed in. + + ### Custom markers + - It is used to configure how the marker icon should be look. Due to the limitation of Mendix. The markers are created + based on enumeration. An enumeration containing the name and caption of the markers should be created within your project + and that enumeration assigned to the `Location entity`. From the `Custom markers` tab, the enumeration key and image is + then specified in the `Marker images` + ## Issues, suggestions and feature requests Please report issues at [https://github.com/mendixlabs/google-maps/issues](https://github.com/mendixlabs/google-maps/issues). -## Development -Prerequisite: Install git, node package manager, webpack CLI, grunt CLI, Karma CLI - -To contribute, fork and clone. - - git clone https://github.com/mendixlabs/google-maps.git - -The code is in typescript. Use a typescript IDE of your choice, like Visual Studio Code or WebStorm. - -To set up the development environment, run: - - npm install - -Create a folder named dist in the project root. - -Create a Mendix test project in the dist folder and rename its root folder to MxTestProject. Changes to the widget code shall be automatically pushed to this test project. Or get the test project from [https://github.com/mendixlabs/google-maps/releases/latest](https://github.com/mendixlabs/google-maps/releases/latest) - - dist/MxTestProject - -To automatically compile, bundle and push code changes to the running test project, run: - - grunt - -To run the project unit tests with code coverage, results can be found at dist/testresults/coverage/index.html, run: - - npm test - -or run the test continuously during development: - - karma start +## Development and contribution +Please follow [development guide](/development.md). diff --git a/development.md b/development.md new file mode 100644 index 0000000..f1e63f6 --- /dev/null +++ b/development.md @@ -0,0 +1,68 @@ +# Development and contribution +Prerequisite: Install git, node package manager, webpack CLI, grunt CLI, Karma CLI + +To contribute, fork and clone. + + > git clone https://github.com/mendixlabs/google-maps.git + +The code is in typescript. Use a typescript IDE of your choice, like Visual Studio Code or WebStorm. + +To set up the development environment, run: + + > npm install + +Create a folder named `dist` in the project root. + +Create a Mendix test project in the dist folder and rename its root folder to `dist/MxTestProject`. Changes to the widget code shall be automatically pushed to this test project. +Or get the test project from [https://github.com/mendixlabs/google-maps/releases/latest](https://github.com/mendixlabs/google-maps/releases/latest) + +To automatically compile, bundle and push code changes to the running test project, run: + + > npm start + +To run the project unit tests with code coverage, results can be found at `dist/testresults/coverage/index.html`, run: + + > npm run test:unit + +Run the unit test continuously during development: + + > npm run test:dev + +Run the end to end test during development: + + > npm run test:e2e:dev + +## Scripts +While developing, you will probably rely mostly on `npm start`; however, there are additional scripts at your disposal: + +|`npm run