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

Support for Marker Image URLs #20

Closed
burkeholland opened this issue Jul 26, 2016 · 3 comments
Closed

Support for Marker Image URLs #20

burkeholland opened this issue Jul 26, 2016 · 3 comments
Milestone

Comments

@burkeholland
Copy link

Currently, the plugin only loads local resources as marker images. It would be nice if we could also specify a URL to use for the marker.

@EddyVerbruggen
Copy link
Collaborator

Markers need to be downloaded before they can be used, and the plugin already supports adding markers from local files so it's doable currently but it would be user friendly to have the plugin handle the download process.

A tricky thing here is when multiple markers need to be added with different "remote" images things get messed up as downloads are async.

@EddyVerbruggen
Copy link
Collaborator

EddyVerbruggen commented Nov 16, 2016

Note to self: on iOS downloading marker images likely requires ATS exceptions to be added to the plist

@EddyVerbruggen EddyVerbruggen added this to the 2.3.0 milestone Nov 16, 2016
@EddyVerbruggen
Copy link
Collaborator

So you can now do one of these on both iOS and Android:

icon: 'http://www.bme.be/wp-content/uploads/2014/04/marker.png'
icon: 'res://icon'
iconPath: 'res/markers/home_marker.png'

I've implemented a high performance algorithm that fetches and caches markers from urls. It's probably not perfect but for a first attempt I'm pretty happy.

This map uses images configured in various ways:

simulator screen shot 16 nov 2016 22 40 50

Available from GitHub now, on npm when 2.3.0 is published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants