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

Adding a few useful features #56

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Adding a few useful features #56

wants to merge 8 commits into from

Conversation

j-ro
Copy link

@j-ro j-ro commented Oct 5, 2014

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:

  • added a setMapData function which allows you to update the map with new options after it has been shown, to, say, change the lat/lon view or zoom level programatically
  • changed how annotation images work so that if no image URL is specified, no image will be used instead of a default image
  • added in the commented geoOnMapMove stuff, so callbacks are fired when the user pans/moves the map
  • added a javascript callback when an annotation is selected or deselected, in case you want to take action right there, before the user clicks, say, the info button

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.

j-ro added 6 commits October 5, 2014 15:14
setMapData function to change map programatically
setMapData function to change map programatically

no annotation image if url not present

annotation select/deselect javascript callback

onMapMove event
@jvence
Copy link

jvence commented Oct 7, 2014

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

@jvence
Copy link

jvence commented Nov 11, 2014

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
Copy link
Author

j-ro commented Nov 11, 2014

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
Copy link

jvence commented Nov 11, 2014

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

to match iOS
@j-ro
Copy link
Author

j-ro commented Nov 24, 2014

updated with android code for feature parity

@jvence
Copy link

jvence commented Dec 3, 2014

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

@j-ro
Copy link
Author

j-ro commented Dec 3, 2014

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
Copy link

jvence commented Feb 17, 2015

Anyway to show an image inside an info window?

@j-ro
Copy link
Author

j-ro commented Feb 17, 2015

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.

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.

2 participants