adampax / titanium-mapbox

Titanium Module Wrapper for MapBox iOS SDK
MIT License
67 stars 23 forks source link

Change colour of Pins #13

Open ghost opened 9 years ago

ghost commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

ghost commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 8 years ago

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 commented 8 years ago

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