Telerik-Verified-Plugins / Mapbox

Native OpenGL maps for your Cordova app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible to style the markers or polygons?

benvallack opened this issue · comments

Is it possible to change the colour/style of the markers or change the colour/stroke etc for polygon shapes? Thanks!

Hi, @benvallack . You can set custom image for marker with my fork or if you need overlay layer see this discussion.

Awesome - many thanks!

@Anothar - Could you provide advice on below. I can't get custom images to appear, I keep getting the default marker.

  1. I went to your fork here.
  2. Downloaded it as a zip and replaced the plugin files provided by Telerik with yours.
  3. I then placed a png in the root directory with the index.html, and linked to it via the url attribute in the Mapbox.show function.
  4. After re-building I keep getting default markers. I can't get a custom png to display. (The map functions perfectly otherwise)

Is there a step above I am missing to use your fork as a replacement for the default telerik version?

I should also mention I'm using Ionic...Any help, greatly appreciated!!!

Hi, @ldweb . Reinstall plugin. Because during plugin installation files also get copied to directory platforms/{platform_name}. It's not enough to just replace files in plugins directory.

@Anothar - Thanks for the prompt response! Deleted Files and trying to install via cli but its returning

Error: Failed to fetch plugin https://github.com/anothar/Mapbox/tree/features_image_marker via git. Either there is a connection problems, or plugin spec is incorrect: Error: git: Command failed with exit code 128 Error output: Cloning into '/var/folders/71/5pjy023d3xn7p78q4qlr1jph0000gp/T/git/1470725692219'... fatal: repository 'https://github.com/anothar/Mapbox/tree/features_image_marker/' not found

I found on another thread you commented:

Try this:
cordova plugin add https://github.com/anothar/Mapbox/tree/features_image_marker
If doesn't work - just download as .zip

I then tried to install by downloading zip and running
cordova plugin add /path/to/unzipped/files

I then get a similar error
Error: Failed to fetch plugin plugin/cordova-plugin-mapbox via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Please make sure you have the correct access rights and the repository exists.

I've never installed stuff from github via a separate fork...

Just checking, am I following the correct steps above?

Thanks again for helping, much appreciated.

@ldweb

I then tried to install by downloading zip and running
cordova plugin add /path/to/unzipped/files

This is correct way. Check path - try to specify absolute path. Error is related to path (it can't find it).

@Anothar your branch, did you do any perf checks how fast it is compared to the default markers?

Hi, @pke . No. It's better to ask authors of mapbox sdk about performance. I just use their api.

@Anothar That worked!
P.S. I also had to use cli to remove plugin properly first (goes without saying but I missed this step...DOH!)
cordova plugin remove cordova-mapbox-mapbox

Thanks again for your help and awesome work!!!!!!

I'm trying to build this for distribution but am getting this error:

ld: warning: ignoring file ....../Plugins/cordova-plugin-mapbox/libSVGghLib.a, missing required architecture arm64 in file ..../Plugins/cordova-plugin-mapbox/libSVGghLib.a (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SVGRenderer", referenced from:
      objc-class-ref in CDVMapbox.o
  "_OBJC_CLASS_$_GHControlFactory", referenced from:
      objc-class-ref in CDVMapbox.o
  "_MakeSureSVGghLinks", referenced from:
      +[CDVMapbox initialize] in CDVMapbox.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Not sure what is causing this? Many thanks.

Hi, @benvallack . I've just fixed it. Please, redownload.

Thanks so much!