Re: [mapguide-users] HttpApi doc improvement
Ok i undestand, I don't have a knowledge of the mapguide source code, but i can analyse when i need and add what i undestand to the doc. Can you tell me where is the entry point of HttpApi in source code? Thank you ps: i think there is no plan to move to ,github? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/HttpApi-doc-improvement-tp5302731p5302973.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] HttpApi doc improvement
Hi, http://trac.osgeo.org/mapguide/wiki/HttpApi With usage of createRuntimeMap, MapGuide can be a good datesource for javascript viewer like OpenLayers. Unfortunaly the HttpApi Doc is not weel completed or up to date. I think MapGuide can gain lot of new users with doc improvment. Thank you, David -- View this message in context: http://osgeo-org.1560.x6.nabble.com/HttpApi-doc-improvement-tp5302731.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] impersonate mapagent to server
Ok i see what you can do building your own mapagent.. But not sure that it can help me. I don't know how you can impersonte the final MgHttpRequest and mapserver to use it. My idea was that the final process ("mapserver.exe" service) know who i am. So Oracle know who i am. Basic usage: in a view with "SYS_CONTEXT('USERENV','OS_USER')" col, display my username in MapGuide Tooltip (right now it show the local system acount who run mapserver.exe). Heavy usage: connect Oracle to a VPD and filter shown based on connected user. thank you, i learnerd some usefull trick with mapagent -- View this message in context: http://osgeo-org.1560.x6.nabble.com/impersonate-mapagent-to-server-tp5298061p5302728.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] impersonate mapagent to server
thank you, i will give it a try -- View this message in context: http://osgeo-org.1560.x6.nabble.com/impersonate-mapagent-to-server-tp5298061p5302618.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] impersonate mapagent to server
Hi, I trying to do something tricky: I have two windows server: - IIS webserver with mapagent, with windows authentication - Application server for MapGuide Can this be done? When the user open a map (juste using basic weblayout and viewer), send the user windows credentials to the mapguide server. Why? Because i wan't the oracle connexion used by the map to know wich user is connected. You think it's possible? Thank you -- View this message in context: http://osgeo-org.1560.x6.nabble.com/impersonate-mapagent-to-server-tp5298061.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Mapguide 3 Tileset coordinates system
Too bad :/ My openlayers map are declared in my local EPSG. I'm stuck with old Tile method. Thank you, David -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-3-Tileset-coordinates-system-tp5217299p5217729.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Mapguide 3 Tileset coordinates system
Hi, I read that the tilesets XYZ only support EPSG:3857 coordinates system. Do you plan to support other CS like the standard tileset ? thank you, David -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-3-Tileset-coordinates-system-tp5217299.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] multiple mapguide instance on win64 / .net development environment
I forgot, i have no serveur on my workstation, only mapagents -- View this message in context: http://osgeo-org.1560.x6.nabble.com/multiple-mapguide-instance-on-win64-net-development-environment-tp5211386p5213342.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Tips : Error connecting AIMS to SQLSERVER
Hi, Here is two tips about connecting MapGuide / Aims through Sql provider: 1) Error listing Data Store : Your username can't connect to all datastore but has public role that give him the right to list all datastore. Don't know why, but MG try to connect all. Save your connection with the credentials but not choosing the datastore, close the editor. Edit it as xml, add this: It should work now. 2) you meet this error when testing connection or try to build a layer : *Feature Source - expected entity name for reference* This one was hard to solve, it's password related! The password i was using contains the character. Since MG use lot of xml, i think the was breaking an xml string. Avoid it. I think other chars can break it but didnt try all :p I didn't try with Oracle, PostGis or other password protected provider, i think it break it too. David -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Tips-Error-connecting-AIMS-to-SQLSERVER-tp5074482.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Tips : Error connecting AIMS to SQLSERVER
So i can't check the value if Maestro doesn't store as plain text :) i tryed downloading the MG_USER_CREDENTIALS files attached to the feature source but it doesn't contains password :) -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Tips-Error-connecting-AIMS-to-SQLSERVER-tp5074482p5074556.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Python user scripts for MapGuide Maestro 5.0
eheh, needed to update schema too, so i wrote this simple one :) -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Python-user-scripts-for-MapGuide-Maestro-5-0-tp5067941p5071747.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Error on insert features into SQL Server Spatial
Ok, Tried to update AIMS 2013 to SP1 but it didn't include that. Wonder if my customer would to use aims 2014 :) Thank you, David -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-on-insert-features-into-SQL-Server-Spatial-tp4987600p5071484.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] mapguide 2.4 sql server spatial feature source - can't select the data store and can't use join extensions
Hi, Did you solved this one? The server principal «myUser» is not able to access the database «OneOfTheDatabasesInTheServer” under the current security context I think it is security related problem but i'm not familiar with sql server. David -- View this message in context: http://osgeo-org.1560.x6.nabble.com/mapguide-2-4-sql-server-spatial-feature-source-can-t-select-the-data-store-and-can-t-use-join-extenss-tp5033688p5071511.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Zoom to Extents
If you're map contain's base layer , the zoom will adjust to one of the fixed zoom level. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Zoom-to-Extents-tp4203098p5071486.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Error on insert features into SQL Server Spatial
Hi, I'm getting this error with infrastructure map server 2013, it use FDO 3.7 but i don't know if it use the patched version of Mapguide's core. Does someone know? I have tested this on both fdo enabled/not enabled database. Tried with Id columns as identity and as simple columns (providing id during the insert command). Same effect: data is inserted but got this error as response. thank you, David -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-on-insert-features-into-SQL-Server-Spatial-tp4987600p5071317.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Python user scripts for MapGuide Maestro 5.0
Hi,Here is a simple script based on your to update all your layers featuresource from one to another (e.g. : all your layers feature source from dev environnement to production environnement) .It only change the source, you have to use the same schema in your environnements.It check if the layer featuresource match oldF then replace it with newFUsage : -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Python-user-scripts-for-MapGuide-Maestro-5-0-tp5067941p5071324.html Sent from the MapGuide Users mailing list archive at Nabble.com.___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: targeting tile to delete
Looks good! thank you -- View this message in context: http://osgeo-org.1560.n6.nabble.com/targeting-tile-to-delete-tp4535625p4539197.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] targeting tile to delete
Hi, I'm using basemap with tiled cache, but some data are updated each week. My users would like to see fresh data, so my solution is to calculate wich tile to delete when data is updated. Do you know a method to calculate tile name (-1_2.png) and tile directory (R-0 ...) for each scale? Thank you -- View this message in context: http://osgeo-org.1560.n6.nabble.com/targeting-tile-to-delete-tp4535625p4535625.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Modify Map with base layers before load?
Hi, Actually i'm modifying my map before load by copy in session repo before loading the weblayout the steps ares: - copy wl in session - copy mapdefinition in repo - add layer to mapdef - update wl map resid I need to use base layer for some performance issue, but copying the map to the session change the map name and mapguide create a new tile folder. Do you think there is a possibility to avoid this? Thank you David -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Modify-Map-with-base-layers-before-load-tp7171738p7171738.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] [SymbolDefinition]
Hi, I succefully made some custom symbolDefinition for my maps ( point geometry with information popup like googleMap..). But i noticed that the selection is restricted to an Area around the insertion Point, is it possible to extend the selection area to the whole symbol, do i missed a params? thank you, David -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/SymbolDefinition-tp5320303p5320303.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Ajax Viewer and Digitizing - may be a bug
you can use setTimeout(myScript,500) in the invokeScript instead of myScript. myScript is delayed of 500 ms and the digitizer start on your next click -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Ajax-Viewer-and-Digitizing-may-be-a-bug-tp2216718p5297742.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Generate a pdf view of the current map
Hi, If you want good quality pdf, you have to code it! Using ths API you can render image and embed it in pdf using pdf tools (look at itextsharp pour C# or tcpdf for php). One good trick to simulate good looking pdf is rendering big image that you embed in your pdf, IE: calculate the image size needed for an A4 pdf and double the size.. Lines will look sharpened and can be printed.. :) good luck :) -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Generate-a-pdf-view-of-the-current-map-tp5264270p5265015.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Plot Dwf Files
As i remember the dwf plot use your local setting and need something like space as thousand separator (i had an issue like this on french operating system). try looking at scale number format.. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Plot-Dwf-Files-tp4969570p5008984.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] [Custom SymbolDefinition]avoid Point symbol used for line
Hi, I'm trying to use SymbolDefinition in two ways: - Custom symbols for points - Custom line style for line. I'm using an Oracle datasource, the feature class contains Point and Line data. My custom line style works fine, My custom point style works fine.. when there is no line data in the table. The problem is that the symbol is shown on each vertice of the line. I can go throw the disapointment with a little trick: adding a filter to the composite rules (IE: Length2D (GEOMETRY) = 0 ) wich help. it's not very clean.. Here is a symboldefinition: ?xml version=1.0 encoding=UTF-8? CompoundSymbolDefinition xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xsi:noNamespaceSchemaLocation=SymbolDefinition-1.1.0.xsd version=1.1.0 NameGasWithStartEndSymbols/Name SimpleSymbol SimpleSymbolDefinition NameOutline/Name Graphics Path GeometryM 0.0,0.0 L 3.0,2.0 L 3.0,-2.0 Z/Geometry LineColorFF00/LineColor LineWeight0/LineWeight /Path /Graphics PointUsage Angle0/Angle /PointUsage ParameterDefinition / /SimpleSymbolDefinition RenderingPass0/RenderingPass /SimpleSymbol /CompoundSymbolDefinition Do you have an idea? Did i miss a parameter? Thank you, David -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Custom-SymbolDefinition-avoid-Point-symbol-used-for-line-tp5009735p5009735.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] RE: ForegroundColor from FDO property
Hi, As Traian answered to me, it don't work if you have hex value in your column, you have to translate value to decimal in your database, not int layerdefinition. Ie: if you replace youre FF00 value by 4278255615 in your database , you will see the good color I don't think that the ToInt32 can do the right operation. I don't know what kind of database you are using, but maybe it can work with a procedure call (in case of oracle). good luck! -- View this message in context: http://n2.nabble.com/ForegroundColor-from-FDO-property-tp4708122p4796638.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] RE: ForegroundColor from FDO property
Thanks! It works! Note: the FDO property containing the integered color must be a string property type. I tried with double or int64 property type, doesn't work. David -- View this message in context: http://n2.nabble.com/ForegroundColor-from-FDO-property-tp4708122p4721339.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] RE: ForegroundColor from FDO property
oh sorry: juste try to edit xml with maestro to have Fill FillPatternSolid/FillPattern ForegroundColormyFdoProperty/ForegroundColor BackgroundColorFF00/BackgroundColor /Fill instead of: Fill FillPatternSolid/FillPattern ForegroundColorFF00/ForegroundColor BackgroundColorFF00/BackgroundColor /Fill where myFdoProperty is a string column containing hex color (eg: FFEFEFEF...) David -- View this message in context: http://n2.nabble.com/ForegroundColor-from-FDO-property-tp4708122p4714824.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] ForegroundColor from FDO property
Hi, When you create a mapguide layer, you can set some symbolization using FDO properties (eg: set a point angle from the Rotation column from an oracle table, line thickness...). Is theyr a way to set text symbolization like foreground color using properties? I tried to do it manualy by editing xml. Not working, but maybe someone has an idea? Thank you, David -- View this message in context: http://n2.nabble.com/ForegroundColor-from-FDO-property-tp4708122p4708122.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] [ajaxViewer] Digitizer mouseUp problem with IExplorer7 / IE8 (patch included)
When you use the viewer api (DigitizeRectangle...) with IExplorer 7/8, on mouseUp you're callback function is thrown but the mouse is not well released. I explain: the digitizer work, call the callback function, but the mouse seems to be traped in the mapspace: when i move the mouse pointer in the legend frame (or other frame if my viewer is in a frameset) i can see the x/y mouse position of the status bar been updated. If i move the pointer over an hyperlink or simply a mapguide toolbar button, the hover event is not fired. after one click everything work well again. On webApplication where i used a custom overviewmap (my overviewmap use the DigitizeRectangle), the behavior is worst.. i found a trick that could help: after hours on this problem i found that the bug is in wz_jsgraphic in the clear function. when the shape div has it innerHtml reseted.. as solution i replaced these digitizer function: this.InitFeedback = function() { var rd = document.getElementById(this.fbDiv).style; rd.position = absolute; rd.left = this.fbPos + px; rd.top = 0px; rd.width = this.fbW + px; rd.height = this.fbW + px; rd.visibility = visible; rd.clip = rect(0px + this.fbW + px + this.fbH + px + 0px); } this.ClearFeedback = function() { if(this.fbDiv) document.getElementById(this.fbDiv).style.visibility = hidden; if(this.fbShape) this.fbShape.clear(); } by this.InitFeedback = function() { if(this.fbShape) this.fbShape.clear(); var rd = document.getElementById(this.fbDiv).style; rd.position = absolute; rd.left = this.fbPos + px; rd.top = 0px; rd.width = this.fbW + px; rd.height = this.fbW + px; rd.visibility = visible; rd.clip = rect(0px + this.fbW + px + this.fbH + px + 0px); } this.ClearFeedback = function() { if(this.fbDiv) document.getElementById(this.fbDiv).style.visibility = hidden; } The div innerhtml is cleared when the digitizer start instead of digitizer end. It works for me. Good luck with digitize! David -- View this message in context: http://n2.nabble.com/ajaxViewer-Digitizer-mouseUp-problem-with-IExplorer7-IE8-patch-included-tp3906244p3906244.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] [ODBC provider] Select within
Hi, i'm using the Select Within tool and i encountered a problem with Point on ODBC layers: the select within tool (and also the spatial operators used via API) does not perform a select within operation but an Envelope Intersects. Can we bypass this? thank you, David -- View this message in context: http://n2.nabble.com/-ODBC-provider--Select-within-tp3424323p3424323.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Oracle FDO and View
Hi, Features can be selectable if you add primary key to your view (MapGuide need Primary key on all feature to be selectable). David GordonL wrote: Hi David, did you ever solve this problem? I am having trouble that features drawn from VIEWS in Oracle are not selectable (FDO 4.3). This is true for both the Autodesk Oracle Provider AND the KING one.. thanks gordon David Hequet wrote: Hello, About this case i'm using Autodesk Mapguide Enterprise 2008 with Autodesk Spatial Oracle FDO. One of the new feature is using Oracle View I tried to use a view with geometry, it work, but features can't be selectable! I make them selectable in Studio but they are not, either in dwf or ajax viewer. Is it the same with the Oracle King provider? Or anyone has an idea on how make them selectable (really :p ) -- View this message in context: http://n2.nabble.com/Oracle-FDO-and-View-tp1811392p2945420.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
RE: [mapguide-users] Oracle FDO and View
With Oracle you can add primary key (don't confuse index and Key) to view (sorry i don't have the sql here). Materialized view is a good way to improve performance (espacially if you use view on multiple database). Haris Kurtagic wrote: Yes, you need to create materialized view for index or you can use KingFdoClass metadata table to tell provider which column will be used as primary key. Haris -Original Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of GordonL Sent: Wednesday, May 20, 2009 3:05 PM To: mapguide-users@lists.osgeo.org Subject: Re: [mapguide-users] Oracle FDO and View Thanks David, Index on a view? The core tables are already indexed - including the GEOMETRY column. Do you mean convert it to a MATERIALIZED VIEW and index it then? thanks gordon David Hequet wrote: Hi, Features can be selectable if you add primary key to your view (MapGuide need Primary key on all feature to be selectable). David GordonL wrote: Hi David, did you ever solve this problem? I am having trouble that features drawn from VIEWS in Oracle are not selectable (FDO 4.3). This is true for both the Autodesk Oracle Provider AND the KING one.. thanks gordon David Hequet wrote: Hello, About this case i'm using Autodesk Mapguide Enterprise 2008 with Autodesk Spatial Oracle FDO. One of the new feature is using Oracle View I tried to use a view with geometry, it work, but features can't be selectable! I make them selectable in Studio but they are not, either in dwf or ajax viewer. Is it the same with the Oracle King provider? Or anyone has an idea on how make them selectable (really :p ) -- View this message in context: http://n2.nabble.com/Oracle-FDO-and-View-tp1811392p2946000.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://n2.nabble.com/Oracle-FDO-and-View-tp1811392p2946099.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Using MapGuide on multi-core server?
Hi, I have a customer who wan't to improve MapGuide perfomance. He want to install it on a server with 16 cpu cores. Does MapGuide profit from that? Ps: the OS is Window 2003 server Thank you, David -- View this message in context: http://n2.nabble.com/Using-MapGuide-on-multi-core-server--tp2133607p2133607.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
re[mapguide-users] sourceservice.resourceexist
Hi, I'm using MapGuide 2.0.1 with C#. The Api method ResourceExist return a not yet implemented error. So i made my own resourcexist, method using ResourceService.GetResourceContent(resId) with an error handling. like this: try resourceService.getResourcecontent(resid) return true catch return false It works but i think it's not good for server's health to provoc errors (as they are logged, it fill up the log..). Do you have a better idea about making a resourceExist method? Thank you, David -- View this message in context: http://www.nabble.com/resourceservice.resourceexist-tp18828199p18828199.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] [Red Hat 4 MGOs 2.0.1] Raster issue (always raster...)
Hi, We have compiled a MGOS 2.0.1 server on Linux, raster support works, but only with small image I have an aerial photography with tiled tiff : about 70mb each. It don't show nor crash If i compress the tiff (with Autodesk Raster Workshop) at 4mb or less each: MapGuide renders the images. I tried also a single 7mb tiff, don't show. Any idea on how to tweak MapGuide server? Or should i create smaller tiff image? Thank you, David -- View this message in context: http://www.nabble.com/-Red-Hat-4-MGOs-2.0.1--Raster-issue-%28always-raster...%29-tp18256405p18256405.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] [Red Hat 4 MGOs 2.0.1] Raster issue (always raster...)
No i didn't try these changes. I think i will try next week. There is no data solution? zspitzer wrote: have you tried the changes in http://trac.osgeo.org/mapguide/ticket/610 ? On Thu, Jul 3, 2008 at 8:35 PM, David Hequet [EMAIL PROTECTED] wrote: Hi, We have compiled a MGOS 2.0.1 server on Linux, raster support works, but only with small image I have an aerial photography with tiled tiff : about 70mb each. It don't show nor crash If i compress the tiff (with Autodesk Raster Workshop) at 4mb or less each: MapGuide renders the images. I tried also a single 7mb tiff, don't show. Any idea on how to tweak MapGuide server? Or should i create smaller tiff image? Thank you, David -- View this message in context: http://www.nabble.com/-Red-Hat-4-MGOs-2.0.1--Raster-issue-%28always-raster...%29-tp18256405p18256405.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- Zac Spitzer - http://zacster.blogspot.com (My Blog) +61 405 847 168 ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/-Red-Hat-4-MGOs-2.0.1--Raster-issue-%28always-raster...%29-tp18256405p18257825.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] auto-computing map extents
Hi, You can use API to create a mgselection on a layer using an mgquery object whith no filter. Then you can get the MgSelection's MgEnveloppe. As you can't change MapExtent during the runtime (i don't know if it's possible with MGOS 2.0) you will have to create and execut your own ZoomExtent method when the map is loaded Beware of MGselection-GetEnveloppe (i don't remember the syntax), I had a lot of Server Crash. It happen on know polygon but i don't know why (depend on FDO provider? Or altered Oracle database..) David Hequet Jackie Ng wrote: Hi All, I am trying to bulk load a series of XML resources into MapGuide. Each Feature Source that gets loaded references a distinct SDF file stored in an externally aliased directory. All these SDF files share the same feature schema and classes. What I want to do is for each SDF file, is to load a series of templated xml resources (feature sources, layers, maps, web layouts, etc) into a location in the repository. I can process the feature sources and layers fine, but am stuck with the maps, because I know that they __will__ have different map extents. Is there a way to automatically compute the visible map extents of a particular group of feature sources? - Jackie -- View this message in context: http://www.nabble.com/auto-computing-map-extents-tp15819851s16610p15825049.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] knowing active tool?
Is there a simple method to know the viewer current active tool (DWF or AJAX)? -- View this message in context: http://www.nabble.com/knowing-active-tool--tf4247298s16610.html#a12087211 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] [Ajax viewer Bug] offset in displayed image
look at my modification, it seems to work fine with ResizeMapSpace(); at then end of load Ismael Cams wrote: Hello David, this seems to be a problem similar I reported about a week ago (http://www.nabble.com/forum/ViewPost.jtp?post=11809953framed=yskin=16610) When you leave the properties pane enabled the offset is correct. I did not post it as a bug until now. Kind regards, Ismaël David Hequet wrote: Hi, There is a bug in displaying map image in the Ajax Viewer: Look at this screenshot, the image is cut on the top. http://www.nabble.com/file/p12050259/MGVIEWER_OFFSETERROR.jpg this offset is really anoying: - the image is not well displayed - but the mouse coordinates are catched without the offset: it cause bad selection : you click a polygone, it take the polygone 10px lower. Sames for tooltips. - This bug appears only when the property pane is not showed on the WebLayout and the browser size is higher than (around) 500px or 600px - It disapears when you resize the window. - I tried on firefox and IE 6 I modified the ajaxmappane.tmpl by Adding a call to ResizeMapSpace() in the delayedInit() Method like this: ... GetPropertyCtrl().SetProperties(0); ResizeMapSpace(); mapInit = true; parent.OnMapLoaded(); ... It's not very good but there is no offset bug after this. David -- View this message in context: http://www.nabble.com/-Ajax-viewer-Bug--%22offset%22-in-displayed-image-tf4235307s16610.html#a12054144 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] WebserverExtension - MapguideServer dialog question
Hi, I have a few question about WebServerExtension and MapguideServer Dialog protocol: 1) Which dialog protocol use WebServerExtension when it ask MapGuideServer for a map? I Think it's standard TCP-IP, can you confirm? 2) I have to try a configuration like this: - 1 server with IIS, WebServerExtension and mapguide Site - 1 Site Server with MapguideServer - 1 Site Server that is the first Site Server replica The WebServerExtension part must use either the first server or the second. It must be capable of switching from one to the other depending on charge or crash from one of the site server. I'm Using MG Enterprise 2008. Do you have a hint how to do that? Thank's! -- View this message in context: http://www.nabble.com/WebserverExtension-%3C-%3E-MapguideServer-dialog-question-tf4200127s16610.html#a11945702 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] modifying map before the WebLayout loads
Hi, I'm using Mapguide Enterprise 2008 / MGOS1.2 and i can't solve this: I have a frame containing mapguide viewer. This frame performs VB.net scripts that initialize the Session and eventually modify the mapdefinition (setting filter's on layer..) I can Access the map before the WebLayout Load process like this: (assuming that sessionId and resourceService are well intialized) Dim aMap As New MgMap() dim aMapname as String = MyMapName resId = New MgResourceIdentifier(aMapLibraryPath aMapname . MgResourceType.MapDefinition) aMap.Create(resourceService, resId, aMapname) Dim mapStateId As MgResourceIdentifier = New MgResourceIdentifier(Session: + sessionId + // + aMapname + . + MgResourceType.Map) aMap.Save(resourceService, mapStateId) It actually work, i access the MgMap Object, can perform modification. But when the the layout loads after these modification (via http://localhost/mapguide/mapviewerajax/?Session=; + sessionId + WebLayout=Library://myLayout.WebLayoutLOCALE=fr on my frame) it seems to re-initialize the MapDefinition : If i access it and ask about my modified Filters, there back to original value.. I'm almost sure this code was good working using Mapguide 2007 / MGOS 1.0. Does the WebLayout Load process changed? I you have an idea that can help me.. -- View this message in context: http://www.nabble.com/modifying-map-before-the-WebLayout-loads-tf4116094s16610.html#a11705193 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] modifying map before the WebLayout loads
hum ok, my code miss this: Load WebLayout Modify WebLayout to point to session map Save WebLayout in session repo Open viewer pointing to WebLayout in Session repo Since there is no API to access WebLayout, i dont know how to acces/modify the Layout. Thank you! Kenneth, GEOGRAF A/S wrote: I realise that the supplied code is just a snip of the actual code, but the overal procedure should be: Create session Load MapDefinition Modify MapDefinition as needed Save MapDefinition in session repo Load WebLayout Modify WebLayout to point to session map Save WebLayout in session repo Open viewer pointing to WebLayout in Session repo If you modify any layers, you must also save those to the session repo, and update the MapDefintion to point to those. Below I think you are saving a runtime map, rather than the MapDefinition. I belive the viewer will overwrite any existing runtime maps. Regards, Kenneth, GEOGRAF A/S David Hequet skrev: Hi, I'm using Mapguide Enterprise 2008 / MGOS1.2 and i can't solve this: I have a frame containing mapguide viewer. This frame performs VB.net scripts that initialize the Session and eventually modify the mapdefinition (setting filter's on layer..) I can Access the map before the WebLayout Load process like this: (assuming that sessionId and resourceService are well intialized) Dim aMap As New MgMap() dim aMapname as String = MyMapName resId = New MgResourceIdentifier(aMapLibraryPath aMapname . MgResourceType.MapDefinition) aMap.Create(resourceService, resId, aMapname) Dim mapStateId As MgResourceIdentifier = New MgResourceIdentifier(Session: + sessionId + // + aMapname + . + MgResourceType.Map) aMap.Save(resourceService, mapStateId) It actually work, i access the MgMap Object, can perform modification. But when the the layout loads after these modification (via http://localhost/mapguide/mapviewerajax/?Session=; + sessionId + WebLayout=Library://myLayout.WebLayoutLOCALE=fr on my frame) it seems to re-initialize the MapDefinition : If i access it and ask about my modified Filters, there back to original value.. I'm almost sure this code was good working using Mapguide 2007 / MGOS 1.0. Does the WebLayout Load process changed? I you have an idea that can help me.. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/modifying-map-before-the-WebLayout-loads-tf4116094s16610.html#a11708876 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] How to show a map (PHP)
that's sound's easy. Use Mapguide Studio to create a layout without toolbar, frame,status and without property window. You don't need to code to do that (if i didn't misunderstood what you need) akj006 wrote: Hello David, Firstly I would like to say a thanks to you thinking that you can solve my problem. My requirement is to display a reference map. Means I need a map in the place of the task frame. I need a map with out the tool bar property window task frame alone(map alone with smaller size). I am able to display the map without the task frame anf tool bar. But I need it with out the property window. Thanks David, Anil David Hequet wrote: Look at the Tutorial provided with Mapguide Studio to create an entire map from Data to Weblayout. The look at the Hello Map sample in devguide (you can download it here) that is a working php sample wich show a Map Ps: You can't show a map in a browser, you can only show a weblayout. The Tutorial's is a good point to undestand how work mapguide (before going trough the code) mates wrote: Hi Sorry, but I don't understood well what you mean. Can u pls explain better, Im a beginner :) I have already created a Weblayout, but I don't know how to get this map to this Weblayout. Show me a exapmle pls.. Thank you.. Mansoureh Sadrykia wrote: Hi! Why don't you use mapguide studio to create a webLayout and then define its address in your library by PHP?(As the code you've written for the mapDefinition) mates [EMAIL PROTECTED] wrote: I create a map and then i add a layer. Now i need it to show the map in the browser, but i don't know how to do it using PHP :( Can you help me pls? include constants.php; MgInitializeWebTier('webconfig.ini'); $site = new MgSite(); $userInfo = new MgUserInformation(Administrator, admin); $site-Open($userInfo); $id = $site-CreateSession(); $siteConnection = new MgSiteConnection(); $siteConnection-Open($userInfo); $resourceService = $siteConnection-CreateService(MgServiceType::ResourceService); $mapDefId = new MgResourceIdentifier(Library://22/mapa.MapDefinition); $map = new MgMap(); $mapName = $mapDefId-GetName(); $map-Create($resourceService, $mapDefId, $mapName); $LayID = new MgResourceIdentifier(Library://22/kraje.LayerDefinition); $newLayer = new MgLayer($LayID, $resourceService); $newLayer-SetVisible(true); $newLayer-SetLegendLabel($newLayer-GetName()); $newLayer-SetDisplayInLegend(true); $layerCollection-Insert(0, $newLayer); $mapId = new MgResourceIdentifier(Session:$id//$name. . MgResourceType::Map); $map-Save($resourceService, $mapId); And what now? :) -- View this message in context: http://www.nabble.com/How-to-show-a-map-%28PHP%29-tf3973550s16610.html#a11279107 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users - Need a vacation? Get great deals to amazing places on Yahoo! Travel. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/How-to-show-a-map-%28PHP%29-tf3973550s16610.html#a11304266 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] How to show a map (PHP)
Look at the Tutorial provided with Mapguide Studio to create an entire map from Data to Weblayout. The look at the Hello Map sample in devguide (you can download it here) that is a working php sample wich show a Map Ps: You can't show a map in a browser, you can only show a weblayout. The Tutorial's is a good point to undestand how work mapguide (before going trough the code) mates wrote: Hi Sorry, but I don't understood well what you mean. Can u pls explain better, Im a beginner :) I have already created a Weblayout, but I don't know how to get this map to this Weblayout. Show me a exapmle pls.. Thank you.. Mansoureh Sadrykia wrote: Hi! Why don't you use mapguide studio to create a webLayout and then define its address in your library by PHP?(As the code you've written for the mapDefinition) mates [EMAIL PROTECTED] wrote: I create a map and then i add a layer. Now i need it to show the map in the browser, but i don't know how to do it using PHP :( Can you help me pls? include constants.php; MgInitializeWebTier('webconfig.ini'); $site = new MgSite(); $userInfo = new MgUserInformation(Administrator, admin); $site-Open($userInfo); $id = $site-CreateSession(); $siteConnection = new MgSiteConnection(); $siteConnection-Open($userInfo); $resourceService = $siteConnection-CreateService(MgServiceType::ResourceService); $mapDefId = new MgResourceIdentifier(Library://22/mapa.MapDefinition); $map = new MgMap(); $mapName = $mapDefId-GetName(); $map-Create($resourceService, $mapDefId, $mapName); $LayID = new MgResourceIdentifier(Library://22/kraje.LayerDefinition); $newLayer = new MgLayer($LayID, $resourceService); $newLayer-SetVisible(true); $newLayer-SetLegendLabel($newLayer-GetName()); $newLayer-SetDisplayInLegend(true); $layerCollection-Insert(0, $newLayer); $mapId = new MgResourceIdentifier(Session:$id//$name. . MgResourceType::Map); $map-Save($resourceService, $mapId); And what now? :) -- View this message in context: http://www.nabble.com/How-to-show-a-map-%28PHP%29-tf3973550s16610.html#a11279107 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users - Need a vacation? Get great deals to amazing places on Yahoo! Travel. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/How-to-show-a-map-%28PHP%29-tf3973550s16610.html#a11284023 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Getting all object Enveloppe
and about Select Envelope(geometry) from datasource I can do that with ExecuteSqlQuery ? do you have a syntaxe sample? i think i have to check if the fdoprovider has this SpatialExtents capability? going through each object can be very slow on each map loading.. Kenneth, GEOGRAF A/S wrote: Yes, you have to run through each feature in the feature reader. Then on each feature, you have to use some of the obscure AgfReader/Bytereader stuff to get the actual object out of the geometry column. When you have the object, it has a GetEnvelope() method. Regards, Kenneth, GEOGRAF A/S David Hequet wrote: Arg, i was so close of my goal I think i have to take a look on your idea because of MGSelection seems to have a limit. here is my code: For i = 0 To aMgLayerCollection.GetCount() - 1 aLayer = aMgLayerCollection.GetItem(i) aProvider = Me._getLayerSourceType(, aLayer) If aProvider Autodesk.Raster And aProvider DWF Then aLayerClassName = aLayer.GetFeatureClassName() If aClassArray.IndexOf(aLayerClassName) = -1 Then Me._log(aLayerClassName) aLayerFeatureId = aLayer.GetFeatureSourceId() aLayerResId = New MgResourceIdentifier(aLayerFeatureId) aFeatureReader = Me._featureService.SelectFeatures(aLayerResId, aLayerClassName, aMGQueryOptions) aMGSelection.AddFeatures(aLayer, aFeatureReader, 0) aClassArray.Add(aLayerClassName) End If End If Next i aMgEnveloppe = aMGSelection.GetExtents(Me._featureService) I got an error: Une exception non classifiée s'est produite.Une exception non classifiée s'est produite. Une exception s'est produite dans la méthode MgServerSelectFeatures.SelectFeatures à la ligne 217 dans le fichier c:\build_tux_area\mgdev\server\src\services\feature\ServerSelectFeatures.cpp In english non classified error When i use this method aMgEnveloppe = aMGSelection.GetExtents(Me._featureService) it didn't happen every time: on a map with ~30 features dispatched on 4 layers it's ok on a map with ~1200 features on 2 layers it crash (if i try too much the mgserver service crash). i didn't see a getExtent method on the featurereader, i think i have to check enveloppe for each feature in the reader? Kenneth, GEOGRAF A/S wrote: You don't have to use the selection part. You can extract the object directly from the feature reader. Once you have the object, you can also get the extent (aka bbox). If you then construct an envelope object, you can add the features envelope to original envelope. Something like: create a new MgFeatureQueryOptions with an empty filter create a new Envelope For Each Layer { Use a featureReader with the MgFeatureQueryOptions Add the feature's envelope to the outer Envelope } Get zoom extents from the Envelope Other than this, I don't think you can optimize it anymore, as you need to execute the query on each layer. I think there is a Get Extents on the feature source, but I can't find it. And I don't think it works on filtered datasources. Perhaps you can execute the query with some SQL optimizations like Select Envelope(geometry) from datasource. Hope it helps. Regards, Kenneth, GEOGRAF A/S David Hequet wrote: Hello, I'm trying to make a fonction that can return me the enveloppe of the entire visible map (no way with original map extent). Explain: I have a map template with a lot of layers, i have a function that change all the layer filter (basic filter, no spatial) to see different map based on that template. Doing that make the zoom to original extent useless, because data are not on the same area. I wan't to set the new map extent in the MapDefinition. My ask is about getting the new extent. I thought to do it like that: create a new MgSelection create a new MgFeatureQueryOptions with an empty filter For Each Layer { Use a featureReader with the MgFeatureQueryOptions Add the selected feature to the MgSelection } Getting the MgSelection enveloppe It will work, but i don't think it's very optimized with a lot of Layer/Feature (and it will used at each map load, filter modification..) Did someone have a better way? Thank you! Ps: sorry for my poor english, ask i you want precision. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/Getting-all-object-Enveloppe-tf3864317s16610.html#a11003408 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users
Re: [mapguide-users] Getting all object Enveloppe
Using mapagent test page i can have a geometry using oracle spatial function: SELECT SDO_AGGR_MBR(GEOMETRY) FROM LOCAL WHERE ID_NIVEAU=510 (where id_niveau is a group property) But i prefer use mapguide function. I was looking SelectAggregate method. But it seems difficult to create a group filter. I'm trying :p If Someone has un example, i take it! Kenneth, GEOGRAF A/S wrote: Yes, you should be able to assign the query to the MgQueryOptions object. I don't have a syntax sample, and the avalibility/performance would probally depend heavily on the provider. If you have a lot of features/layers, I would probally be a perfomance killer doing it manually. Regards, Kenneth, GEOGRAF A/S David Hequet wrote: and about Select Envelope(geometry) from datasource I can do that with ExecuteSqlQuery ? do you have a syntaxe sample? i think i have to check if the fdoprovider has this SpatialExtents capability? going through each object can be very slow on each map loading.. Kenneth, GEOGRAF A/S wrote: Yes, you have to run through each feature in the feature reader. Then on each feature, you have to use some of the obscure AgfReader/Bytereader stuff to get the actual object out of the geometry column. When you have the object, it has a GetEnvelope() method. Regards, Kenneth, GEOGRAF A/S David Hequet wrote: Arg, i was so close of my goal I think i have to take a look on your idea because of MGSelection seems to have a limit. here is my code: For i = 0 To aMgLayerCollection.GetCount() - 1 aLayer = aMgLayerCollection.GetItem(i) aProvider = Me._getLayerSourceType(, aLayer) If aProvider Autodesk.Raster And aProvider DWF Then aLayerClassName = aLayer.GetFeatureClassName() If aClassArray.IndexOf(aLayerClassName) = -1 Then Me._log(aLayerClassName) aLayerFeatureId = aLayer.GetFeatureSourceId() aLayerResId = New MgResourceIdentifier(aLayerFeatureId) aFeatureReader = Me._featureService.SelectFeatures(aLayerResId, aLayerClassName, aMGQueryOptions) aMGSelection.AddFeatures(aLayer, aFeatureReader, 0) aClassArray.Add(aLayerClassName) End If End If Next i aMgEnveloppe = aMGSelection.GetExtents(Me._featureService) I got an error: Une exception non classifiée s'est produite.Une exception non classifiée s'est produite. Une exception s'est produite dans la méthode MgServerSelectFeatures.SelectFeatures à la ligne 217 dans le fichier c:\build_tux_area\mgdev\server\src\services\feature\ServerSelectFeatures.cpp In english non classified error When i use this method aMgEnveloppe = aMGSelection.GetExtents(Me._featureService) it didn't happen every time: on a map with ~30 features dispatched on 4 layers it's ok on a map with ~1200 features on 2 layers it crash (if i try too much the mgserver service crash). i didn't see a getExtent method on the featurereader, i think i have to check enveloppe for each feature in the reader? Kenneth, GEOGRAF A/S wrote: You don't have to use the selection part. You can extract the object directly from the feature reader. Once you have the object, you can also get the extent (aka bbox). If you then construct an envelope object, you can add the features envelope to original envelope. Something like: create a new MgFeatureQueryOptions with an empty filter create a new Envelope For Each Layer { Use a featureReader with the MgFeatureQueryOptions Add the feature's envelope to the outer Envelope } Get zoom extents from the Envelope Other than this, I don't think you can optimize it anymore, as you need to execute the query on each layer. I think there is a Get Extents on the feature source, but I can't find it. And I don't think it works on filtered datasources. Perhaps you can execute the query with some SQL optimizations like Select Envelope(geometry) from datasource. Hope it helps. Regards, Kenneth, GEOGRAF A/S David Hequet wrote: Hello, I'm trying to make a fonction that can return me the enveloppe of the entire visible map (no way with original map extent). Explain: I have a map template with a lot of layers, i have a function that change all the layer filter (basic filter, no spatial) to see different map based on that template. Doing that make the zoom to original extent useless, because data are not on the same area. I wan't to set the new map extent in the MapDefinition. My ask is about getting the new extent. I thought to do it like that: create a new MgSelection create a new MgFeatureQueryOptions with an empty filter For Each Layer { Use a featureReader with the MgFeatureQueryOptions Add the selected feature to the MgSelection } Getting the MgSelection enveloppe It will work, but i don't think it's very optimized with a lot of Layer/Feature (and it will used at each map load
Re: [mapguide-users] Zoom to Extents
I'm trying do the same thing with the DWF viewer. If you are using the ajax viewer, look at the ZoomSelection() in ajaxmappane.templ file. This method ask the mapagent for the selecion extents, calculate the scale, then use ZoomToView(). But with the DWF viewer, i found no tricks to reproduce the calculteScale() method. Nichols, Mark A. wrote: I see documentation on zooming to an x,y point at a particular scale. What I have is the extents already calculated and I'd like to zoom to that particular extent. I use postgis to get the extents of an object. Results look like county_geometry_extents=631637.01873067,287635.157843,687024.28129651,33 7031.91208509. Can I zoom not to a point, but instead to a set of points that make up the extents. Mark Nichols ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/Zoom-to-Extents-tf3447457s16610.html#a10891104 Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users