imhotep / MapKit

Cordova MapKit plugin
139 stars 75 forks source link

Adding a few useful features #56

Open j-ro opened 10 years ago

j-ro commented 10 years ago

Hey folks, figured I'd put in a PR with some features I've developed for my app at bustrackdc.com

The main additions/changes are:

This is iOS code -- I'll submit a PR for Android when I can (I've got it written, just have to port it over) if this is useful to you. Or if it's not, no worries, just let me know and I'll keep this stuff to myself.

jvence commented 10 years ago

Very useful. Thanks for sharing! These are key features that were needed.

jvence commented 10 years ago

Is there any way to detect click to the info box. So the user would click on the pin and it opens the info box but then I would like to detect if the user clicks again on the info box. Thanks

j-ro commented 10 years ago

I'm sure there is. It's not a feature I use, so you'd have to build it yourself at this point. I think the original version can detect clicks on the "i" button, at least on ios.

jvence commented 10 years ago

Yes it does but it seems to have a bug with the index that is passed to the specified javascript function. Will try to fix that bug and maybe submit a pull request. Thanks

j-ro commented 9 years ago

updated with android code for feature parity

jvence commented 9 years ago

Is there any way to change the pin to display a custom icon instead of a colored pin?

j-ro commented 9 years ago

Could probably be added, depending on cross platform support. Not something I'm personally interested in, so if you want to add it, go ahead!

jvence commented 9 years ago

Anyway to show an image inside an info window?

j-ro commented 9 years ago

I believe the original code allowed for an icon in the little flag that pops out from a pin when clicked. My updates I believe comment out that functionality, but could be added back in. I'm sure a full image is possible too.