Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #13 from mendix/chore/readme-custom-markers
Browse files Browse the repository at this point in the history
Add guide for custom markers
  • Loading branch information
mmehmetAliIzci authored Aug 13, 2019
2 parents 3961c9c + 0635cfe commit 750d8c0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ Mendix 7.18.0
- Add an **XPath Constraint** `Optional`

### Custom Markers

---
**NOTE**

For best results (see image), your custom marker must be

- PNG
- **32px** width **32px** height
- The bottom pin must be on the center of the image

![customMarker](/assets/customMarkerExample.jpg)
---

- It is used to configure how the marker icon should be look.
- Under **locations** option on the **Map properties** tab, select the **Markers** tab
- For the **Default** option, the widget bundled marker will be displayed
Expand Down
Binary file added assets/customMarkerExample.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "maps",
"widgetName": "Maps",
"version": "1.0.4",
"version": "1.0.5",
"description": "Show locations on Google Maps",
"copyright": "Mendix BV",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions src/components/LeafletMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ export class LeafletMap extends Component<LeafletMapProps, LeafletMapState> {
if (url) {
marker.setIcon(icon({
iconUrl: url,
iconSize: [ 38, 95 ],
iconAnchor: [ 22, 94 ],
iconSize: [ 32 , 32 ],
className: "marker"
}));
}
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="Maps" version="1.0.4" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="Maps" version="1.0.5" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="Maps.xml"/>
</widgetFiles>
Expand Down

0 comments on commit 750d8c0

Please sign in to comment.