Functions Leaflet OSM

(5 posts) (2 voices)
  1. ingjgarciad, Member

    Hi, is posible to use leaflet options in openstreets maps extension?

    Example

    Polygon

    var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];
    var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);

    my syntax

    SELECT poligonoCuadrante FROM cuadrante

    Result

    [[[18.920901876484265,-99.19075012207033],[18.920171137797592,-99.18735980987549],[18.917857110881993,-99.19233798980714],[18.920374121086564,-99.19281005859376]]]

    and graphical result (my own system)

  2. myDBR Team, Key Master

    Sure, why not.

    Run the updater and you can use dbr.openstreetmap.polygon-command. See documentation for more info.

    --
    myDBR Team

  3. ingjgarciad, Member

    Nice, I run the updater build (3858) and test

    select 'dbr.openstreetmap.polygon',latlngs, options
    from(
    SELECT
    '[[18.920901876484265,-99.19075012207033],[18.920171137797592,-99.18735980987549],[18.917857110881993,-99.19233798980714],[18.920374121086564,-99.19281005859376]]' as latlngs, '{color: ''red''}' as options
    ) AS q;
    select 'dbr.openstreetmap', 'coordinates','',1024,800;

    but not get image

  4. myDBR Team, Key Master

    The polygons are drawn on top of the existing map (coordinate / heatmap). So you need to have a result set for the dbr.openstreetmap-command (=the result set invokes the actual map).

    In case you just want to show polygons (no coordinates), use an empty result set for the coordinates. In SQL Server you can use TOP(0).

    select 'dbr.openstreetmap', 'coordinates','',1024,800;
    
    select top(0) 0, 0

    Btw, you might want to run the updater again as we fixed an issue where when multiple maps were drawn on same report with polygons only the initialization of the last one was not working.

    --
    myDBR Team

  5. ingjgarciad, Member

    Nice with update the problem is solved.

    :D


Reply

You must log in to post.