Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change colour of Pins #13

Open
ghost opened this issue Mar 4, 2015 · 8 comments
Open

Change colour of Pins #13

ghost opened this issue Mar 4, 2015 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 4, 2015

Hi Adam

I noticed that you have a folder with various map pin images in three different colours. The default seems to be set to "pin-blue-png".
What properties do we need to amend to change the pin colour?

Also, can we implement our own pin designs by replacing those in the assets/pins folder?

Thanks
burgons

@ghost
Copy link
Author

ghost commented Mar 4, 2015

Further to my request above.

I replaced the pins in the assets folder with my own designs. This didn't change the pins shown in my app. I guess that those pins aren't being used by the module.

Hopefully there is another way...

Cheers
burgons

@ghost
Copy link
Author

ghost commented Mar 6, 2015

Just to clarify, this is the sort of thing I'm trying to achieve. To visually identify POI's with the use of coloured Pins / Pins with category images.

Link to Mapbox iOS SDK video) https://dl.dropboxusercontent.com/u/575564/picksvid.mov

Hope that helps!
Cheers
burgons

@maikkley
Copy link

maikkley commented Mar 9, 2015

The color of the pin is set by declare a tintColor on your window :-)

@ghost
Copy link
Author

ghost commented Mar 9, 2015

Hi maikkley

That's interesting. tintColor eh. Not something I would have guessed. Thanks ;-)

Any idea how we can have different colours/pins for different categories on the same map?

Cheers
burgons

@maikkley
Copy link

maikkley commented Mar 9, 2015

I see for a solution to set an image for an annotation. So this is the Solution. When i get it working, i Paste the Solution here;-)

@adampax
Copy link
Owner

adampax commented Mar 10, 2015

TintColor works on these, eh? Cool, didn't know that.

As for changing pin colors, at one time I threw in those other pin colors in an effort for parity with the standard appcelerator map modules, but I don't think I wired it up completely. Other items got in the way.

Mapbox actually has a pretty cool setup for custom pin colors, shapes and sizes, but it requires internet connectivity in order to access their api, so I didn't spend much time on it.

@coreyd303
Copy link

Did anyone successfully make this work, either changing the existing pin colors or using a custom markerImage? Trying to use my own pins at app/assets/images/pin_name.png, I have tried all the paths that I can think of and no change, based on the source code it looks like it should work, any ideas?

@maikkley
Copy link

Ups, i forget to Paste my code ;-)
I will make this tomorrow, if i dont forget it again

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

No branches or pull requests

3 participants