Opened 16 years ago

Closed 16 years ago

#127 closed enhancement (fixed)

MapTips widget for MapServer

Reported by: pagameba Owned by: pdeschamps
Priority: P1 Milestone: 2.0
Component: Widgets Version: 1.0.7
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: Analysing

Description

The current MapTips widget is mapguide-specific. Marc has done some excellent work converting it to support mapserver, but there is too much logic in the client. We should incorporate Marc's changes as well as:

1) write an equivalent PHP script for mapguide 2) ensure both PHP scripts take the same input parameters 3) ensure both PHP scripts output the same JSON objects 4) make the client side completely generic to the current map architecture as we have done with most other widgets

Attachments (6)

maptip.php (3.5 KB ) - added by mpfister 16 years ago.
Maptip2.js (13.6 KB ) - added by mpfister 16 years ago.
maptip.2.php (3.9 KB ) - added by pdeschamps 16 years ago.
Mapserver Version of MapTip.php - to be located in /trunk/layers/mapserver/php
Maptip2.2.js (14.5 KB ) - added by pdeschamps 16 years ago.
maptips2.js - located in /trunk/widgets/
Maptip2.3.js (14.5 KB ) - added by pdeschamps 16 years ago.
maptips2.js - located in /trunk/widgets/
ApplicationDefinition.xml (33.7 KB ) - added by pdeschamps 16 years ago.
ApplicationDef - for maptips2

Download all attachments as: .zip

Change History (13)

by mpfister, 16 years ago

Attachment: maptip.php added

by mpfister, 16 years ago

Attachment: Maptip2.js added

comment:1 by mpfister, 16 years ago

I added my MapServer code. I think some of the parameters passed to the MapServer php script could be trimmed down.

comment:2 by mpfister, 16 years ago

Also, all Maptips should register for the MAP_BUSY_CHANGED event so that they can be hidden while the map is refreshing. Otherwise they sit there in a blank screen and look sloppy. I have this fixed and will include it in the next version.

comment:3 by pdeschamps, 16 years ago

Owner: changed from pspencer to pdeschamps

Thank you, mpfister for your contribution. I am going to tackle this one and equalize the I/O for mapserv / mapguide.

by pdeschamps, 16 years ago

Attachment: maptip.2.php added

Mapserver Version of MapTip.php - to be located in /trunk/layers/mapserver/php

by pdeschamps, 16 years ago

Attachment: Maptip2.2.js added

maptips2.js - located in /trunk/widgets/

by pdeschamps, 16 years ago

Attachment: Maptip2.3.js added

maptips2.js - located in /trunk/widgets/

by pdeschamps, 16 years ago

Attachment: ApplicationDefinition.xml added

ApplicationDef - for maptips2

comment:4 by pdeschamps, 16 years ago

I have amended the original maptips submitted by mpfister thank you again for your contribution. Above you will notice I have added three files to this ticket:

maptip.2.php

Maptip2.3.js

ApplicationDefinition.xml

What we need to do here now is create an equivalent maptip.php for the MapGuide arch. Instead of requesting it directly with JS. We should be able to request the GML from the back end their by keeping the client side code agnostic to whatever platform we are using.

I think even though we can branch out the client side js to address different mapping technologies. I feel a better approach would be to have the js as independent from the mapping architectures as possible. Makes for a more manageable code base.

Also i have added a piece of functionality where you can specify a templated URL in the applicationDefinition where by you can reference attribute names in the url. Eg:

this: http://myserver/parkInfo.php?parkId=[PARK_ID]&name=[NAME_E]

gets rendered as : http://myserver/parkInfo.php?parkId=40&name=Wood%20Buffalo%20National%20Park

comment:5 by mpfister, 16 years ago

Here's what I used to hide the maptips during redraw.

this.getMap().registerForEvent(Fusion.Event.MAP_BUSY_CHANGED, this.busyChanged.bind(this));

and

 busyChanged: function() {
        if (this.getMap().isBusy()){
        this.bIsVisible = false;
        this.hideMaptip();
        }
    },

As stated above, this keeps the maptips from showing while the map is redrawing.

comment:6 by madair, 16 years ago

(In [1771]) re #127: refactor maptip code into the MapGuide layer type (as was done for MapServer) - also related to issue #166

comment:7 by madair, 16 years ago

Resolution: fixed
Status: newclosed

(In [1773]) closes #127: add busyChanged listener

Note: See TracTickets for help on using tickets.