help:create maps on the fly without having a map file

3 messages Options
Embed this post
Permalink
芮建勋

help:create maps on the fly without having a map file

Reply Threaded More More options
Print post
Permalink
Hi everyone,
I have found a paragraph in a book named <Web Mapping Illustrated-p>,as fllowing:
"MapServer map files are still a key component to writing a MapScript-based application. If you have a map file ready to use, you can start accessing and manipulating it right away. However, a powerful feature of MapScript is the ability to create maps on the fly without having a map file. In this case, you can build your map from scratch".
I donot understand that we can create maps on the fly without having a map file.Is mapserver can really work without mapfile,especially in the environment via PHP/MapScript or Python /MapScript ?
Best Regards,
Rui jx



网易邮箱用户购物独享现金返还

_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Tamas Szekeres

Re: help:create maps on the fly without having a map file

Reply Threaded More More options
Print post
Permalink
Hi,

MapScript provides the object model (a couple of classes with
properties and methods) for setting up your map configuration from
scratch. You would normally require to create a map object (mapObj)
add layers and set up the styles and symbology for each layer. You
could then render the map into an image object or you could optionally
save your map configuration to a mapfile for later use.
Here is an example written in C# to set up a map configuration
programmatically:
http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapscript/csharp/examples/inline.cs
This example creates the shapes for the layer programmatically as well.

Best regards,

Tamas




2009/10/2 芮建勋 <[hidden email]>:

> Hi everyone,
> I have found a paragraph in a book named <Web Mapping Illustrated-p>,as
> fllowing:
> "MapServer map files are still a key component to writing a MapScript-based
> application. If you have a map file ready to use, you can start accessing
> and manipulating it right away. However, a powerful feature of MapScript is
> the ability to create maps on the fly without having a map file. In this
> case, you can build your map from scratch".
> I donot understand that we can create maps on the fly without having a map
> file.Is mapserver can really work without mapfile,especially in the
> environment via PHP/MapScript or Python /MapScript ?
> Best Regards,
> Rui jx
>
>
> ________________________________
> 网易邮箱用户购物独享现金返还
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>
_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Sumit Sharma

Re: help:create maps on the fly without having a map file

Reply Threaded More More options
Print post
Permalink
In reply to this post by 芮建勋
Not just you can create mapObj, and add layers in your map, you can also save your map obj. It will create map file for you as per the syntax followed by mapserver. you can then use this map file for futhre use.