Custom Markers OSM

(6 posts) (2 voices)
  • Started 6 months ago by ingjgarciad
  • Latest reply from myDBR Team
  1. ingjgarciad, Member

    Hi, I try use your example from Customizing markers but get an error

    Invalid column name '{icon: 'fa-spinner',shape: 'circle',markerColor: 'red',prefix: 'fa',extraClasses: 'fa-spin'}'.

    select 'dbr.openstreetmap', 'coordinates', '', 400, 220;
    select 33.005, -117.270, "{icon: 'fa-spinner',shape: 'circle',markerColor: 'red',prefix: 'fa',extraClasses: 'fa-spin'}"

    https://mydbr.com/doc/?extensions.openstreetmap.html

    Can you help me please.

    Posted 6 months ago #
  2. myDBR Team, Key Master

    In SQL Server you escape the single quotes by using two consecutive ones. You also seem to miss the third parameter (bubble_html-parameter).

    Use syntax:

    select 'dbr.openstreetmap', 'coordinates', '', 400, 220;
    
    select 33.005, -117.270, '',  '{icon: ''fa-spinner'',shape: ''circle'',markerColor: ''red'',prefix: ''fa'',extraClasses: ''fa-spin''}' as 'icon'

    --
    myDBR Team

    Posted 6 months ago #
  3. ingjgarciad, Member

    Nice,

    other question, where is

    (see icon library's documentation)

    I need put some icons from crimes example this

    what is a correct syntax, because i try to use

    'dbr.html: '
    but this not function corectly, or where is icon library's to put inside and call from your syntaxis.

    Thanks again!!

    Posted 6 months ago #
  4. myDBR Team, Key Master

    If you run the atomatic updater you can use format:

    select 'dbr.openstreetmap', 'coordinates', '', 400, 220
    
    select 33.005, -117.265, '', '{iconUrl: ''user/images/atropellado-apachurrado-auto-coche.png'', iconSize: [55, 35]}'

    The new build works in a way that if the marker_option has attribute 'iconUrl', the option will be treated as a custom icon, instead of option for standard marker. (You can also use https://url_to_your_image as value for the iconUrl)

    See Leaflet documentation for custom icons for more info about the options.

    --
    myDBR Team

    Posted 6 months ago #
  5. ingjgarciad, Member

    Hi again, I use your code (sysntax)

    select 'dbr.openstreetmap', 'coordinates', '', 400, 220
    
    select 33.005, -117.265, '', '{iconUrl: ''user/images/atropellado-apachurrado-auto-coche.png'', iconSize: [55, 35]}'

    Result -->

    and

    select 'dbr.openstreetmap', 'coordinates', '', 400, 220
    
    select 33.005, -117.265, '', '{iconUrl: ''http://eonproduccion.net/CICG_SEG/ICONS/atropellado.png'', iconSize: [55, 35]}'

    and result is the same --> .

    My version of MyDBR is 5.4.0 (Build 3838)

    Thanks again!!

    Posted 6 months ago #
  6. myDBR Team, Key Master

    Run the automatic updater to get the latest build which includes support for the iconUrl.

    --
    myDBR Team

    Posted 6 months ago #

Reply

You must log in to post.