Set selection color using MaestroAPI 6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Set selection color using MaestroAPI 6

Hans Milling
Hi all

I am using MaestroAPI 6 and MapGuide 3.1. I can see that the renderdynamicoverlay supports a selection color. The OpenLayers implementation of MapGuide uses GETMAPIMAGE and GETDYNAMICMAPOVERLAY. In my codebehind I use the IMappingService.RenderRuntimeMap.
These do not support setting the selection color. I cannot see any way to set the selection color in the RuntimeMap either.
Question is. Can it be done? Is it possible or is the renderdynamicoverlay something used by Fusion or React layout?
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Jackie Ng
I think RenderRuntimeMap just needs to be extended to take a selection color.

The only catch is if HTTP provider is connected to a < 3.0 MG server, if a custom selection color is passed in, we need to either make it throw NotSupportedException or just ignore the selection color as RFC148 (custom selection colors for GETMAPIMAGE) was only introduced in MGOS 3.0

http://trac.osgeo.org/mapguide/wiki/MapGuideRfc148

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Hans Milling
Any change that the RFC148 (that GETMAPIMAGE) will support SELECTIONCOLOR attribute is ported to MGOS 3.1? That would be great as the openlayers implementation can easily be modified to parse the selection color.
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Jackie Ng
I'm a bit confused by your question.

RFC148 was implemented for MGOS 3.0, so custom selection color for GETMAPIMAGE should be supported in every version since.

... Unless you saw the RFC148 link from the RFCs landing page, which erroneously listed the RFC as still in draft (it's not). I've updated that page to reflect the proper status of this particular RFC.

And actually having re-read the RFC that I submitted (Wow! Time flies). The [throw NotSupportedException / do nothing idea] should be extended to non-overlay rendering in general for both Maestro connection providers if we're dealing with a 2.6 or older server.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Hans Milling
Hi Jackie

I cannot get the selection color to change. This is the request from OpenLayers to MapGuide:
http://localhost/mapguide31/mapagent/mapagent.fcgi?session=a273e482-4798-11e7-8000-0a002700000a_en_MTI3LjAuMC4x0B100B0F0B0E&mapname=testmap_Selection&operation=GETDYNAMICMAPOVERLAYIMAGE&format=PNG&locale=en&clip=1&version=1.0.0&SELECTIONCOLOR=7800FF00&_olSalt=0.9691361453344751&setdisplaydpi=96&setdisplayheight=740.3000000000001&setdisplaywidth=1527.9&setviewcenterx=575268.24502178&setviewcentery=6224436.8770125&setviewscale=2500

This is the output:


The selection color is set to green 7800FF00 (Green with 50% transparency)
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Jackie Ng
Change the VERSION to 3.0.0

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Hans Milling
Hi Jackie

If I set version to 3.0.0 MapGuide 3.1 returns:
The requested operation version is invalid.

The requested operation version is invalid. - MgHttpGetDynamicMapOverlayImage.Execute() line 122 file c:\working\build_area\mapguide\3.1.0\x64\mgdev\web\src\httphandler\HttpGetDynamicMapOverlayImage.cpp - MgHttpRequestResponseHandler.ValidateCommonParameters() line 218 file c:\working\build_area\mapguide\3.1.0\x64\mgdev\web\src\httphandler\HttpRequestResponseHandler.cpp - MgHttpGetDynamicMapOverlayImage.ValidateOperationVersion() line 141 file c:\working\build_area\mapguide\3.1.0\x64\mgdev\web\src\httphandler\HttpGetDynamicMapOverlayImage.cpp

If I use version 2.0.0 the selection image returned is a blank/empty/transparent image.
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Jackie Ng
I totally misread your question (I thought you were referring to GETMAPIMAGE)

You need to prefix the SELECTIONCOLOR with "0x" as indicated here:

https://trac.osgeo.org/mapguide/wiki/HttpApi/RenderingService#GetDynamicMapOverlayImage2.1

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Hans Milling
It works now.
Using parameters VERSION=2.0.0 and BEHAVIOR=7 and of course the SELECTIONCOLOR attribute.

Thanks for your assistance Jackie.

Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Joel Edwin
am still getting a difficultness in configuring map guide maestro,i have already downloaded the software and installed it into my computer but when i try to load shapefile that i created from an arc gis ,it does not respond,any one who is aware of this so that i can get an assistance

On Tue, Jun 6, 2017 at 4:25 AM, Hans Milling <[hidden email]> wrote:
It works now.
Using parameters VERSION=2.0.0 and BEHAVIOR=7 and of course the
SELECTIONCOLOR attribute.

Thanks for your assistance Jackie.





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5323179.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Jackie Ng
Please be more specific about what you mean by loading a shapefile.

Did you create a Feature Source using the SHP provider?

If so, did you add your SHP file and its dbf/prj/shx/etc files and marked the SHP file as the active file? At this point, you should have a valid SHP feature source, which you can then create Layer Definitions from.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Set selection color using MaestroAPI 6

Hans Milling
In reply to this post by Joel Edwin
Hi Joel Edwin

Please do not hijack another thread. If you have a question, you should create a new thread, or else your question could get lost in the original thread.

Best regards
  Hans Milling...