1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    20
    Vote Rating
    1
    Shadin_a is on a distinguished road

      0  

    Default Displaying tooltip over WMS points + considering using Ext

    Displaying tooltip over WMS points + considering using Ext



    I am using WMS layer in my application and I need to display tooltip over my points. I want to use Extjs (Ext.ToolTip) but I am not sure how to get the right position of the tooltip. I see that there is showAt(x,y) method but don't know how to get x,y of each point. also I though of using the courser location but can't figure out how to do it exactly. any help regarding this?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,013
    Vote Rating
    848
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I personally haven't used WMS but how do you know what coords to show it or is there an element that you can show by?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,993
    Vote Rating
    183
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Is your WMS response being rendered on the page as SVG? My only experience with WMS is that the returned file is an image. The image is either a tile like you see with Google base maps or is an image that's a bit larger than the viewable area of the map. In either case there's not really anything there where you see the 'point' from the layer since it's a rendered flat image with transparency.

    If the WMS is a flat image (png):
    You could monitor the events like mouseover/move/click and get the XY from the mouse event and from that the mapping API may let you translate the XY to a lat/long which you can use as a lookup in your DB to get what the point is and show a tooltip at the mouseover/move/click location and populate it with data returned from the lookup using the lat/long.

    Could you use markers for your points instead of a flat wms png overlay? If so you can monitor mouseover much more easily, though massive marker counts can congest the dom - especially on older browsers.

    Can you use WFS instead of WFS for point delivery? It'll be more expensive in the dom since it's rendering SVG polygons rendered from the WFS data, but I've used WFS for points before and the WFS data package coming back from the map server can deliver rich data that you can use in your toolip. That said, it was some surgery getting that to work, but at least the mouse cursor knew where it was in relation to the points on the map.

Thread Participants: 2

Tags for this Thread