Ticket #127 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

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: External ID:
state: Analysing Browser: All
Operating System: All

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

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

Change History

Changed 5 years ago by mpfister

Changed 5 years ago by mpfister

Changed 5 years ago by mpfister

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

Changed 5 years ago by mpfister

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.

Changed 5 years ago by pdeschamps

  • 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.

Changed 5 years ago by pdeschamps

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

Changed 5 years ago by pdeschamps

maptips2.js - located in /trunk/widgets/

Changed 5 years ago by pdeschamps

maptips2.js - located in /trunk/widgets/

Changed 5 years ago by pdeschamps

ApplicationDef? - for maptips2

Changed 5 years ago by pdeschamps

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

Changed 5 years ago by mpfister

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.

Changed 4 years ago by madair

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

Changed 4 years ago by madair

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.