Google Maps / Google Earth Plugin/Form: Revision

Last updated by steven

hi

i d like to put a ggogle map onto my site which shows places every user can add to it.
for that i need an input forum which adds the data into an database. the field name
can be:




the output must look like that for each entry:

<Placemark>
    <name>NAME</name>
    <description>

    <![CDATA[
        <div>
            <div style="text-align:left">Street: STREET</div>
            <div style="text-align:left">City: CITY</div> <p>

            <div style="text-align:left">Phone: PHONE</div>
            <div style="text-align:left">Fax: FAX</div> <p>

            <div style="text-align:left">eMail: <a href="mailto:EMAIL">EMAIL </a></div>
            <div style="text-align:left">Internet: <a href="INTERNET">INTERNET</a></div>


            <form action='http://maps.google.com/maps' method='get' target='_blank' class='mapdirform'>
                <br />      
                Plan your Route:
                <br />
               
                Your Place:
                <input type='text' class='inputbox' size='20' name='saddr' id='saddr' value='' />
                <br />
                <input value='get yout route:' class='button' type='submit' style='margin-top: 2px;'>
                <input type='hidden' name='daddr' value='LATITUDE, LONGITUDE'/>
            </form>
        </div>
    ]]>
   
    </description>
    <LookAt>
        <longitude>LONGITUDE</longitude>
        <latitude>LATITUDE</latitude>
        <altitude>0</altitude>
        <range>0</range>
        <tilt>0</tilt>
        <heading>0</heading>
        <altitudeMode>relativeToGround</altitudeMode>
    </LookAt>
    <styleUrl>#msn_red-pushpin</styleUrl>
        <Point>
            <coordinates>LONGTITUDE,LATITUDE</coordinates>
        </Point>
</Placemark>



and all placemarks must be put together to something which looks like:


<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
    <name>dropzones.kml</name>
    <open>1</open>
        <Style id="sh_red-pushpin">
        <IconStyle>
            <scale>1.3</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/pushpin/red-pushpin.png</href>
            </Icon>
            <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
        </IconStyle>
    </Style>
    <Folder>
        <name>Dropzones</name>
        <open>1</open>
       
        <Placemark>
        PLACEMARK DATA FROM DATABASE 1
        </Placemark>
       
        <Placemark>
        PLACEMARK DATA FROM DATABASE 2
        </Placemark>

    </Folder>
</Document>
</kml>



i don´t know if i have to generate a new file each time a new entry is made or if i can directly generate the map
from the database.

any hints or solutions are very welcome

thnks

 

in google maps an entry than will look like:

image

History