[mapguide-users] findparcelfunctions.aspx
Jason Birch
Jason.Birch at nanaimo.ca
Wed Apr 5 17:02:19 EDT 2006
This would be easy if there was a way to represent double quotes in a c#
string literal without escaping. In PHP I'd just use single quotes, but
those are used for character literals in C#, and verbatim string
literals still require escaping of double quotes (by placing two of them
together).
It would be more useful if the sample applications could to do this
programmatically. I think that it should be possible with some minor
changes to the application. Either pass the current MgMap into the
CreateParcelMarkerFeatureSource function as a new parameter, where you
could just do a ->GetMapSRS, or do this outside of the function and pass
in the WKT string as a parameter.
I'm not sure of the importance of the SpatialContext for the individual
features or the sdf file, and I can't see a way of obtaining this from
the map. I wonder if this could be pulled from the SRS using
/^PROJCS\[\"([^\"]*)/ if it is not empty, otherwise
/GEOJCS\[\"([^\"]*)/, or if the spatial context name is more strongly
codified than this.
Jason
________________________________
From: Chris Tallman [mailto:ctallman at innomap.com]
Sent: Wednesday, April 05, 2006 10:27
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] findparcelfunctions.aspx
Thanks Jason that did the trick.
One thing to note. Copying the CoordinateSystemWkt tag directly does
not work.
Backslashes need to be entered. See below.
Original text:
PROJCS["NAD_1983_StatePlane_Indiana_East_FIPS_1301_Feet",GEOGCS["GCS_Nor
th_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378
137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925
199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",328
083.3333333333],PARAMETER["False_Northing",820208.3333333333],PARAMETER[
"Central_Meridian",-85.66666666666667],PARAMETER["Scale_Factor",0.999966
6666666667],PARAMETER["Latitude_Of_Origin",37.5],UNIT["Foot_US",0.304800
6096012192]]
Edited text:
PROJCS[\"NAD_1983_StatePlane_Indiana_East_FIPS_1301_Feet\",GEOGCS[\"GCS_
North_American_1983\",DATUM[\"D_North_American_1983\",SPHEROID[\"GRS_198
0\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",
0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"Fal
se_Easting\",328083.3333333333],PARAMETER[\"False_Northing\",820208.3333
333333],PARAMETER[\"Central_Meridian\",-85.66666666666667],PARAMETER[\"S
cale_Factor\",0.9999666666666667],PARAMETER[\"Latitude_Of_Origin\",37.5]
,UNIT[\"Foot_US\",0.3048006096012192]]";
________________________________
From: Jason Birch [mailto:Jason.Birch at nanaimo.ca]
Sent: Wednesday, April 05, 2006 12:44 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] findparcelfunctions.aspx
That OGC well known text representation of the LL84 Coordinate Reference
System (CRS) is being used to create the marker's SDF feature source:
MgCreateSdfParams sdfParams = new MgCreateSdfParams("LL84", ll84Wkt,
parcelMarkerSchema);
featureService.CreateFeatureSource(parcelMarkerDataResId,
sdfParams);
So I think that it would make sense that it's affecting your markers.
The CreateFeatureSource docs are here:
https://mapguide.osgeo.org/nonav/docs/webapi/d5/d10/class_mg_feature_ser
vice_ab9a61218e9ea48601edfde782272055.html
<https://mapguide.osgeo.org/nonav/docs/webapi/d5/d10/class_mg_feature_se
rvice_ab9a61218e9ea48601edfde782272055.html>
You can pull the spatial context for one of your existing layers through
the mapagent api tests.
- Go to http://localhost/mapguide/mapagent/index.html
<http://localhost/mapguide/mapagent/index.html>
- Click on "Resource service API" in the upper left pane
- Click on "EnumerateResources " in the lower left pane
- In the right pane, fill in "Library://" as the Resource ID and
"FeatureSource" as the Type and click on Submit.
- Copy the contents of the <ResourceID> tag for the feature source with
your desired CRS into your clipboard.
e.g. Library://Samples/Sheboygan/Data/CityLimits.FeatureSource
- Click on "Feature service API" in the upper left pane
- Click on "GetSpatialContexts " in the lower left pane
- Paste the previously copied Resource ID into the Resource ID field in
the right pane and click on Submit
- The WKT for your CRS should be revealed in the CoordinateSystemWkt
tag
Jason
________________________________
From: Chris Tallman [mailto:ctallman at innomap.com]
Sent: Wednesday, April 05, 2006 08:57
To: users at mapguide.osgeo.org
Subject: [mapguide-users] findparcelfunctions.aspx
Can someone explain this line from the findparcelfunctions.aspx page.
String ll84Wkt = "GEOGCS[\"LL84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS
84\",6378137,298.25722293287],TOWGS84[0,0,0,0,0,0,0]],PRIMEM[\"Greenwich
\",0],UNIT[\"Degrees\",1]]";
specifically does it need to be edited if I'm using a different
Coordinate system? Say IN83-EF.
I think I have everything working with my map reusing the
findparcel.aspx other than the markers are not placed. I think this
line may be placing the marker off the map.
Chris Tallman
260.407.1761
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060405/e791c7f2/attachment.html
More information about the Mapguide-users
mailing list