[mapguide-users] Seven services in MGOS Site?

Jason Birch Jason.Birch at nanaimo.ca
Tue May 2 16:37:14 EDT 2006


Yes to all your questions, but most of us are still learning here, so it
may take some work.
 
Regarding question 1:
 
If you have the source data at hand, then you can search for features by
attribute with a basic query and get a record set back of the results.
You could actually narrow down the matches using the address ranges in
your segments if you have this information.  
 
>From this you can access the Geometry feature of each row, and
GetEnvelope or GetCentroid to choose where to zoom to.  You could also
do your own primitive geocoding by iterating through the GetCoordinates,
storing a cumulative length and, when it is close to the address's
proportional distance up the feature's GetLength use that as your
location.
 
The MgGeometricEntity Class Reference in the API docs is useful, and
also have a look in the Dev Guide on page 33+ : 
https://mapguide.osgeo.org/docs/MgOpenSourceDevGuide.pdf

You could probably do the inverse via the Viewer API, but I haven't
looked at it much.  You can definitely do it through the Web API by
running a spatial intersects query against the buffered location of your
click.

Regarding question 2:

Tiling is a way of representing the map for web consumption.  I don't
think that it has any affect in the DWF viewer, but in the AJAX viewer
set up with Tiled layers, it allows the browser to fetch surrounding
tiles for a seamless user experience rather than having to re-render the
entire screen on every fetch.  There are some considerations.  Tiles
layers should be groups of layers that are always on at the same time.
Also, on the server side, MG needs to cache representations of these
layers at several view scales, so storage may be a concern.  Layers that
are not identified as tiled are processed as a transparent overlay on
top of the tiled layers.

Jason 

________________________________

From: Kathy Wilson [mailto:kathywilson81 at gmail.com] 
Subject: RE: [mapguide-users] Seven services in MGOS Site?


Thank you very much Traian.
 
I went through the Getting Started Guide of MG Studio Preview and I
think it's a great tutorial. I even managed to load my own SHP file
which contained a network of roads and managed to display the names of
the roads too. Hats off to developers of MGOS and Studio for developing
such a wonderful and user friendly framework. Even a newbie like me
could follow the instructions and develop a map. 
 
I have a few more questions though. Please bear with me for my newbie
questions. 
 
1. Although I worked with an SHP file, I am not exactly sure of it's
format and what more I could do with it. For example, when I went
through the sample application code, I saw that it has used another
geocoding service ( http://geocoder.us/service/rest/geocode) to get the
coordinates of an address. Instead, can I search a street name in the
layer and get the coordinates? (since I believe all that information is
in that layer). 
Also, can I do the converse. That is, can I read a street name off a
layer, given coordinates?
 
2. What's the difference between a tiled map and line map (as the SHP
one I have with roads) ?
 
I would really appreciate if you can point me to any place where I could
get more information of these technologies.

-- 
Kathy Wilson 




More information about the Mapguide-users mailing list