Ad Widget

Collapse

how to adapt hosts markers positions according to zoom level of google map on zabbix?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moslem
    Junior Member
    • Feb 2012
    • 11

    #1

    how to adapt hosts markers positions according to zoom level of google map on zabbix?

    good evening,

    I'm working on monitoring project using the open source Zabbix, I would like to know how to adapt hosts markers positions according to zoom level of Google Map on Zabbix ( in fact, I integrated Google Map when adding a map#, because the problem is that when zooming the map, the hosts markers positions don't change

    there are some screenshots to explain the situation:

    as you see at the screenshot below, I added some hosts markers on the map:

    Click image for larger version

Name:	scshot1.jpg
Views:	1
Size:	95.0 KB
ID:	315955

    then when zooming on the map, you note that the markers positions don't change #just focus on the position of red marker):

    Click image for larger version

Name:	scshot2.jpg
Views:	1
Size:	108.3 KB
ID:	315956

    So friends, what should I do to resolve this problem???

    I am really sorry if I have some grammar mistakes, I don't speak english very good
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    i could bet that it is actually openstreetmap
    as for the specific problem, it might have more to do with how you implemented the integration and which tools did you use.
    is it openlayers ? widgets do seem to match openlayers style.

    maybe you did not change map icons to be openlayers objects, but instead let them to be drawn by the zabbix map code ? if so, it's understandable - zabbix map has no idea about a dynamic map, multiple zoomlevels or even projections...
    Zabbix 3.0 Network Monitoring book

    Comment

    • moslem
      Junior Member
      • Feb 2012
      • 11

      #3
      good evening sir,

      I just used Google Map (in fact my colleague is who integrated the Google Map- just by calling a javascript function), I didn't use openlayers. But really I would like to know how to integrate openstreetmap and how to change map icons to be openlayers objects.

      many thanks for your assistance.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        your screenshots clearly show openstreetmap, and the widgets (zoom bar, position marker) are the openlayers ones.

        OpenStreetMap is a map of the world, created by people like you and free to use under an open license.
        Zabbix 3.0 Network Monitoring book

        Comment

        • moslem
          Junior Member
          • Feb 2012
          • 11

          #5
          Good morning,

          Sir, can you explain me how to change map icons to be openlayers objects?

          many thanks for your assistance

          Comment

          • Zaniwoop
            Senior Member
            • Jan 2010
            • 232

            #6
            This is Google Maps....
            Attached Files

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #7
              Originally posted by moslem
              Sir, can you explain me how to change map icons to be openlayers objects?
              i wouldn't expect that to be trivial. one would have to integrate openalyers & zabbix code. i;m not even sure which of those would end up having more code in the final outcome
              Zabbix 3.0 Network Monitoring book

              Comment

              • becasoft
                Junior Member
                • Oct 2011
                • 2

                #8
                Integrate google map with zabbix

                hello,
                I have extended zabbix to add google map,
                a small problem that blocks the progress of work,
                I use the library:
                - 1.3.1 GoMap
                - Js jquery 1.5.1 min

                function calls with this script:
                Code:
                <script type="text/javascript">
                var num = 1;
                $ (function () {
                $ ("# idofdiv"). GoMap ({
                markers: [{
                latitude: 56.948813,
                Longitude: 24.704004,
                title: 'marker title 1'
                }],
                icon: '.. / img / Notebook.png'
                });
                
                });
                </ script>
                the problem is: I can not display the map and hosts at the same time, I can not display the map as hen I create a bug in the java script zabbix for example (main.js).

                here's what I did for the integrated card:
                -I add the library in page_header.php
                -the script call in sysmap.php

                after my analysis of the problem I understand that there is a double call a jquery function or GoMap.
                Note that I am a beginner in zabbix code.

                thank you

                Comment

                • becasoft
                  Junior Member
                  • Oct 2011
                  • 2

                  #9
                  a small statement,
                  I use the <div id="sysmap_cnt"> to view the map, it works when javascript is zabbix bug.
                  Code:
                  <script type="text/javascript">
                  var num = 1;
                  $ (function () {
                  $ ("#sysmap_cnt"). GoMap ({
                  markers: [{
                  latitude: 56.948813,
                  Longitude: 24.704004,
                  title: 'marker title 1'
                  }],
                  icon: '.. / img / Notebook.png'
                  });
                  
                  });
                  </ script>
                  in this card I can add or remove hosts from a button

                  thank you
                  put hand in hand to improve zabbix code
                  Attached Files

                  Comment

                  Working...