Discussion:
Set selection color using MaestroAPI 6
(too old to reply)
Hans Milling
2017-06-01 09:04:59 UTC
Permalink
Raw Message
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?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Jackie Ng
2017-06-02 09:12:55 UTC
Permalink
Raw Message
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



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5322779.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Hans Milling
2017-06-02 10:45:24 UTC
Permalink
Raw Message
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.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5322797.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Jackie Ng
2017-06-02 13:04:43 UTC
Permalink
Raw Message
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



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5322821.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Hans Milling
2017-06-02 13:44:53 UTC
Permalink
Raw Message
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:
<Loading Image...>

The selection color is set to green 7800FF00 (Green with 50% transparency)



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5322828.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Jackie Ng
2017-06-02 14:24:55 UTC
Permalink
Raw Message
Change the VERSION to 3.0.0

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5322833.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Hans Milling
2017-06-06 06:41:32 UTC
Permalink
Raw Message
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.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5323149.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Jackie Ng
2017-06-06 07:43:33 UTC
Permalink
Raw Message
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



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5323155.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Hans Milling
2017-06-06 11:25:48 UTC
Permalink
Raw Message
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.
Joel Edwin
2017-06-09 22:24:15 UTC
Permalink
Raw Message
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
Post by 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.
--
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
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Jackie Ng
2017-06-13 17:21:27 UTC
Permalink
Raw Message
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



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5324065.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Hans Milling
2017-06-14 13:22:12 UTC
Permalink
Raw Message
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...



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-selection-color-using-MaestroAPI-6-tp5322623p5324189.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

Loading...