[mapguide-users] Tooltip on MapGuide Web API

Chris Claydon chris.claydon at autodesk.com
Tue May 26 10:35:32 EDT 2009


I *think* that when you call RenderMap, it will set the width and height for the in-memory map object. Try calling Save() on the map to save the values back to the session repository before making the calls to GetDisplayWidth/GetDisplayHeight.

Chris.

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of gatopardo
Sent: Tuesday, May 26, 2009 7:05 AM
To: mapguide-users at lists.osgeo.org
Subject: RE: [mapguide-users] Tooltip on MapGuide Web API


I've tried QueryFeatures on MgRenderingService, but it throws an exception.
I've been looking the MgRenderingService source code, and the exception is
because the map has the height, width and scale equal to 0.

I don't know how can I set this values on Web Api. Because the map doesn't
have setDisplayWidth or setDisplayHeight methods, only have GetDisplayWidth
and GetDisplayHeight. Both returns 0.

First of all I have rendered map images, but the map object doesn't save the
render height and width.
So I think the real problem is how to make that the MgMap Object "remembers"
the last render height and width parameters, or how to set them.


Chris Claydon wrote:
> 
> I'm pretty sure that QUERYMAPFEATURES ends up calling the QueryFeatures
> method on the MgRenderingService. You'll need to create a geometry object
> that corresponds to the point you're clicking on. It is best to make it a
> small square rather than a single point, in order for the spatial filter
> to pick up the underlying feature. And it should use coordinates in the
> same coordinate system as the map (not image pixel cords).
> 
> Chris.
> 
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Kenneth
> Skovhede, GEOGRAF A/S
> Sent: Monday, May 25, 2009 7:35 AM
> To: MapGuide Users Mail List
> Subject: Re: [mapguide-users] Tooltip on MapGuide Web API
> 
> The operation is called "QUERYMAPFEATURES", but I can't seem
> to find it as a function from the Web API.
> You can see it in use if you look in the file:
> C:\program
> files\MapGuideOpenSource2.0\WebServerExtensions\www\viewerfiles\ajaxmappane.templ
> line 2555.
> 
> You may also want to read this thread:
> http://lists.osgeo.org/pipermail/mapguide-users/2007-January/004818.html
> 
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> gatopardo skrev:
> 
> Nobody can help me?
> 
> 
> 
> 
> 
> gatopardo wrote:
> 
> 
> 
> How could I get the Tooltip on a point using MapGuide Web API?
> 
> 
> 
> Example:
> 
> I have generated an image using MgRenderingService.RenderMap, and after
> 
> that I want to get the tooltip on a point of this image, using the
> 
> coordinates on image pixels or converting them to lat-lon.
> 
> 
> 
> But I haven't found any method that makes this.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Tooltip-on-MapGuide-Web-API-tp2732016p2974565.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list