Skip to content

custom marker#2

Open
tim7398 wants to merge 3 commits intocgat:masterfrom
5UMU:master
Open

custom marker#2
tim7398 wants to merge 3 commits intocgat:masterfrom
5UMU:master

Conversation

@tim7398
Copy link

@tim7398 tim7398 commented May 18, 2016

No description provided.

cgat and others added 3 commits November 17, 2015 11:48
I've opened up the api to allow the user to specify a custom map_pin.
When using other svg paths, you'll need to manually specify all the other
marker element options correctly to make the pin display correctly.
New options include: `viewBox`, `extraDivClasses`, `extraIconClasses`.
`extraClasses` is no longer supported. `extraDivClasses` gets applied to
the `div` wrapper for the marker. `extraIconClasses` acts as `extraClasses` did
before.

Example Options:

```
options.map_pin = 'M24 0c-9.8 0-17.7 7.8-17.7 17.4 0 15.5 17.7 30.6 17.7 30.6s17.7-15.4 17.7-30.6c0-9.6-7.9-17.4-17.7-17.4z';
opitons.iconSize = [36, 36];
opitons.iconAnchor = [18, 36];
opitons.popupAnchor = [0, -34];
opitons.viewBox = '0 0 48 48';
opitons.shadowSize = [36, 16];
opitons.shadowAnchor = [11, 9];
```

I've also merged some of the changes from hiasinho#8
The icon tag was improperly put inside of the svg. Chrome seemed to pop this out
by default, while other browsers (FF) didn't.

BREAKING CHANGES: `extraClasses` is not longer supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants