Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 14468 Views 18 Replies Latest reply: Jun 15, 2009 1:54 AM by davetayl RSS
davetayl Rank: White Belt 65 posts since
May 22, 2008
Currently Being Moderated

Feb 15, 2009 7:27 AM

GPS coordinates problem with maps

just having a bit of an issue with maps when using gps coordinates, I've managed to get the gps coordinates for some locating using google earth (decimal notation as opposed to degrees, minutes and seconds). when I pop them into google maps, no problem I get the exact location however when I use them as the address in the the locations sub-sections I get some odd results, occasionally they land where they should but often they keep landing on common locations ie if I change the coordinates a bit the dot stays on the same map location, I've tried clearing the geocache and even removing and readding the locations but no luck. Any ideas?

Cheers
D
  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    2. Feb 15, 2009 11:35 AM (in response to davetayl)
    GPS coordinates problem with maps
    Could you provide some examples of working and failed ones, along with
    where they're supposed to be? I'll see if I can recreate and come up
    with a fix or bug.

    Thanks,
    Matt Ray
    Zenoss Community Manager
    community.zenoss.com
    mray@zenoss.com



    On Feb 15, 2009, at 6:27 AM, davetayl wrote:

     

     

    just having a bit of an issue with maps when using gps coordinates,
    I've managed to get the gps coordinates for some locating using
    google earth (decimal notation as opposed to degrees, minutes and
    seconds). when I pop them into google maps, no problem I get the
    exact location however when I use them as the address in the the
    locations sub-sections I get some odd results, occasionally they
    land where they should but often they keep landing on common
    locations ie if I change the coordinates a bit the dot stays on the
    same map location, I've tried clearing the geocache and even
    removing and readding the locations but no luck. Any ideas?

    Cheers
    D







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Ian McCracken ZenossEmployee 257 posts since
    Feb 26, 2007
    Currently Being Moderated
    4. Feb 18, 2009 11:45 AM (in response to davetayl)
    RE: GPS coordinates problem with maps
    Well, you've exposed an excellent bug. Here's what was happening: the lat/long would be sent to Google for geocoding. Google would try to /reverse/ geocode it to an address, then /forward/ geocode the result, obtaining a set of coordinates that in no way necessarily correspond to the originals. I have no idea why it would do this, but that's my best guess as to what happened based on the geocoding responses.

    Luckily, the fix is simple. There's no reason at all to send lat/lng coordinates for geocoding in the first place, so if the address of the Location is coordinates we can just skip that step. I've put the fix in the trunk:

    http://dev.zenoss.org/trac/changeset/12202

    Unfortunately the Google Maps code is quite a bit different in the trunk so you won't be able to apply the patch directly to an older version. You can manually apply it to the ZenGeoMap.geocode function, though. You'll need to make the change in geomap.js /and/ geomap-2.1.js. OR you can just wait for Blue Crab.

    Let me know how it works out.

    --Ian
  • rschnell Rank: White Belt 8 posts since
    Feb 18, 2009
    Currently Being Moderated
    8. Mar 23, 2009 4:53 PM (in response to davetayl)
    2.3.3. stack install does same thing
    These locations show up on the streets closest to the actual locations. They show up fine in google maps and in google earth.

    39.751036 -94.840482
    39.734567 -94.790720

    I haven't tried many but will let you know if I find some that work before applying the patch as described for 2.3.2.
  • rschnell Rank: White Belt 8 posts since
    Feb 18, 2009
    Currently Being Moderated
    9. Mar 23, 2009 6:03 PM (in response to rschnell)
    Am I missing something??
    Ian,

    Made the changes to a 2.3.3 stack install version running on Ubuntu Desktop ver 8.xx. Edited the .js file by hand and then restarted the zenoss using "zenoss restart" as the zenoss user.

    Got the same problems as before; when using lat/lon for address the portlet moves the point to the nearest road (most of the time) or off into a nearby location (some of the time).

    Some of the addresses are in another post in this thread.

    Let me know if I can somehow get you more information.

    Rod

    "ian" wrote:

     

    Well, you've exposed an excellent bug. Here's what was happening: the lat/long would be sent to Google for geocoding. Google would try to /reverse/ geocode it to an address, then /forward/ geocode the result, obtaining a set of coordinates that in no way necessarily correspond to the originals. I have no idea why it would do this, but that's my best guess as to what happened based on the geocoding responses.

    Luckily, the fix is simple. There's no reason at all to send lat/lng coordinates for geocoding in the first place, so if the address of the Location is coordinates we can just skip that step. I've put the fix in the trunk:

    http://dev.zenoss.org/trac/changeset/12202

    Unfortunately the Google Maps code is quite a bit different in the trunk so you won't be able to apply the patch directly to an older version. You can manually apply it to the ZenGeoMap.geocode function, though. You'll need to make the change in geomap.js /and/ geomap-2.1.js. OR you can just wait for Blue Crab.

    Let me know how it works out.

    --Ian

  • Ian McCracken ZenossEmployee 257 posts since
    Feb 26, 2007
    Currently Being Moderated
    10. Mar 30, 2009 4:08 PM (in response to rschnell)
    RE: Am I missing something??
    Put a comma between lat and long:

    39.751036, -94.840482

    If I could somehow get a hold of the regex Google uses to identify coordinates, that'd be sweet. As it is, I'll modify what we're using so that it doesn't require a comma.
  • Ian McCracken ZenossEmployee 257 posts since
    Feb 26, 2007
    Currently Being Moderated
    11. Mar 30, 2009 4:18 PM (in response to Ian McCracken)
    RE: Am I missing something??
    http://dev.zenoss.org/trac/changeset/12839 makes the comma optional.
  • rschnell Rank: White Belt 8 posts since
    Feb 18, 2009
    Currently Being Moderated
    12. Mar 30, 2009 5:12 PM (in response to Ian McCracken)
    comman optional
    thanks ian that seems to have fixed my issue. grin
  • rschnell Rank: White Belt 8 posts since
    Feb 18, 2009
    Currently Being Moderated
    13. Apr 3, 2009 11:49 AM (in response to rschnell)
    new issues yet related.
    As I stated in my last post the changes made the problems go away...mostly.

    As per the discussion surrounding Ticket #4116 and Google always reloading the cache items. It is now happening on this install using the LAT/LON address discussed herein.

    AND! while the locations show up correctly on the individual maps for the locations, some of them are still WAY off on the portlet on the Dashboard.

    Thanks again for all the help in advance. If you need more information please let me know what, where, and how to did it out for you.

    Rod
    :?
  • rschnell Rank: White Belt 8 posts since
    Feb 18, 2009
    Currently Being Moderated
    14. Apr 3, 2009 12:12 PM (in response to rschnell)
    futher information...
    Ian,

    The mapped point showed up correctly for a couple of days/weeks (wasn't paying that close attention and got busy doing other things for the boss) and yesterday/today the situation is this:

    =>on the locations tab->select a location-> select the map tab --> the point is in its proper location and everything is groovy
    =>click on the dashboard link and two things happen on the Google Map Portlet 1) it reloads ALL of the points every time 2) the points it does reload are located on major roads close to the location (close being relative; a point in Wathena KS doesn't show up in CA or NY but on a major street close to the proper point in KS.)

    Zenoss version is Stack 2.3.3 installed on Ubuntu Desktop version 8.10. have 30 different locations mapped and approx 200 items being monitored.

    Rod
1 2 Previous Next

More Like This

  • Retrieving data ...