Jump to content

 
Photo

DB query & Basic Map functions

- - - - -

  • Please log in to reply
14 replies to this topic

#1
eogphp

eogphp

    Newbie

  • Validated Member
  • Pip
  • 3 posts
  • France

Hello all,
This is my first post. I am pretty new to web design and certainly to dynamic cartography. I am very interested by some of the complicated solutions discussed on this forum, most of which greatly exceed my own needs.

I am currently trying to build a website based on a pretty small dataset of archaeological sites (about 300 churches). I am pretty confident that I will be able to design a good PHP/MySQL database search function to allow for searching by feature (eg list all churches containing X,Y, and Z features). The result of the query should then link to the static HTML page of each site which give all the info on the particular church. (Any criticism of this basic model also very welcome!).

Ideally however, I would like to be able to display the result of the searches on a map to facilitate regional comparison. The way I would like to have it would be for the map to show all 300 sites and then for those ones which match the search query to be highlighted (ie all 300 in grey, and the matching sites in red). It would be nice too if the dots on the maps then linked to the static HTML page of the site in question.

I already have photoshop version of the map - ie layered images which are perfect for publicatishing interesting patterns of my own choosing, but I would love to have a dynamic map dependent on the searches of my website users.

Any ideas? Is my model entirely wrong. Is PHP/MySQL the wrong choice? Would I have to go down the route of Flash? Could Flash performing complex queries of the database?

As you can see, I am a true novice but am very willing to learn!!! Please help.
-eogphp

#2
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,833 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Have a look at this:
Points on Google Maps, using PHP and MySQL

The second tutorial covers how to use different icons for different groups of objects, but I haven't updated that one to version 2 of the API yet.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#3
Kartograph

Kartograph

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 319 posts
  • Gender:Male
  • Location:Berlin, Deutschland
  • Germany

Or instead you could use an SVG output. Flash and SVG are both viable choices for data-driven graphics.

#4
eogphp

eogphp

    Newbie

  • Validated Member
  • Pip
  • 3 posts
  • France

hi. SVG output? Any links that explain what this is and how to use it? Thanks

#5
Matthew Hampton

Matthew Hampton

    Hall of Fame

  • Moderator
  • PipPipPipPipPipPipPip
  • 1,289 posts
  • Gender:Male
  • Location:Portland, Oregon
  • Interests:Playing in the mountains and rivers.
  • United States

SVG - Scalable Vector Graphics. The same as Flash but non-proprietary (w3c endorsed).

It still puzzles me why this "open standard" has not been fully adopted/implemented across the world. It seems that this file format has been taken more seriously in Europe. As such, Carto.net is the place to soak-up SVG info.

Oregon Metro - Portland, OR
www.oregonmetro.gov


#6
Nick Springer

Nick Springer

    CartoTalk Founder Emeritus

  • Moderator
  • PipPipPipPipPipPip
  • 939 posts
  • Gender:Male
  • Location:Crosswicks, NJ
  • Interests:Cartographic Design, Print Maps, Graphic Design, Web Development, Ultimate Frisbee
  • United States

Actually SVG is more closely related to Postscript and is supported heavily by Adobe.

Flash is a scaleable vector format technically but they are not the same. :)

Nick Springer

Director of Design and Web Applications: ALK Technologies Inc.
Owner: Springer Cartographics LLC


#7
Kartograph

Kartograph

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 319 posts
  • Gender:Male
  • Location:Berlin, Deutschland
  • Germany

And SVG is growing in the mobile business. More Browsers are adding native support.
To be complete one has to admit, that SVG has been on the runway longer than first expected. It´s takeoff has only happened in certain areas. There was a lot of hype going on.
SVG is also a darling of the european scientific cartographic community, CartoNet is one of the "spinnoffs" of this development (ETH Zürich etc.).

Despite all this, I really think SVG has a lot to offer and should be honestly considered, especially for a low budget solution.

Add to that that it´s very easy to generate SVG through MySQl/PHP serverside.

#8
eogphp

eogphp

    Newbie

  • Validated Member
  • Pip
  • 3 posts
  • France

This all looks great. Any good, basic tutorials? I'm a bit worried that it doesn't have native support in all browsers though.

#9
Matthew Hampton

Matthew Hampton

    Hall of Fame

  • Moderator
  • PipPipPipPipPipPipPip
  • 1,289 posts
  • Gender:Male
  • Location:Portland, Oregon
  • Interests:Playing in the mountains and rivers.
  • United States

Here is a link to a
svg tutorials and here too.

They are not specific to mapping, but will help conceptual understanding.

Flash is a scaleable vector format technically but they are not the same. smile.gif


My intention was not that they are the same - but that they do the same thing (i.e. serving vectors on the web). My understanding is that both SVG and Flash are functionally pretty equal.

I would love to learn more information about the advantages/disadvantages of both in terms of functionality (particularly with respect to cartography).

Oregon Metro - Portland, OR
www.oregonmetro.gov


#10
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,299 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

flash can do so much more than SVG (sorry don't have a list). The biggest thing against SVG is that it is not supported builtin in at least the most spread browser (Ineternet Explorer) - don't know the state of firefox there....
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#11
Matthew Hampton

Matthew Hampton

    Hall of Fame

  • Moderator
  • PipPipPipPipPipPipPip
  • 1,289 posts
  • Gender:Male
  • Location:Portland, Oregon
  • Interests:Playing in the mountains and rivers.
  • United States

  flash can do so much more than SVG (sorry don't have a list).

I am not so sure that true. I guess I should be more specific and use "SWF" instead of Flash as SWF is the file format (like SVG) and Flash is a tool for creating SWF files.

I hunted around a bit and here is a good comparison between SWF and SVG. I found another site that has examples of SVG, SWF, and ActiveCGM.

There are a lot of similarities, but it seems to me that SVG is a more technologically advanced file format than SWF. There are drawbacks to each of course but I don't think the water is that clear. Since Adobe now owns Macromedia (and Flash) I guess they hold the cards....

Oregon Metro - Portland, OR
www.oregonmetro.gov


#12
Kartograph

Kartograph

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 319 posts
  • Gender:Male
  • Location:Berlin, Deutschland
  • Germany

The biggest thing against SVG is that it is not supported builtin in at least the most spread browser (Ineternet Explorer)


While still not native, IE comes with the AdobeSVG player pre-installed. Also an increasing number of cellphones come with a native SVGTiny 1.1 player. New Mozilla releases have Native Support, Opera has native SVGTiny 1.1support.
The biggest advantage SWF holds, is the development environment. But SWF didn´t revolutionize the web either. There are very few flashmaps that do anything meaningful.
Strangely Adobe´s own Illy has a craptacular SVG export, if you want to work cartographically.
SVG might not be what it was supposed to (revolutionizing graphic use on the internet), but is always an option, especially for lowbudget solutions.
And it´s XML, thus you can merrily exchange and morph different kinds of data via XML/XSLT or Database Scripting. SVG is easily scripted via Javascript. So if you want interactivity and don´t want to learn ActionScript, because you already know Javascript, SVG is the way to go.
The fine thing is, you can easily keep your coordinate system just the way it is.
There are a lot of map-specific tutorials on carto.net, including tutorials on serverside map generation.

Don´t ever buy the book:
SVG for Web Designers. It´s crap.

Look for
SVG Unleashed (SAMS)
or
SVG Essentials (O´Reilly)

#13
Martin Gamache

Martin Gamache

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 980 posts
  • Gender:Male
  • Location:Washington DC
  • Interests:History of Topographic Cartography
    Topographic Mapping
    History of Relief Depiction
    Thematic Cartography
    Demographic Cartography
    Cartographic techniques, methods, and tools
    Orienteering
    Panoramic & Kite Photography
  • United States

There are a couple of pretty good third-party add-ons for ArcGIS that do SVG export without any need for customization.
I've used Mapview SVG a bit and liked it (http://www.uismedia..../eng/index.html) this was a couple of years ago, I'm sure the product has matured quite a bit. it allows non-programmer types to export svg ready sites right from an ArcMap project. From a planning and rapid response perspective it was great I could put census maps and data on-line very quickly for people to look at prior to last minute meetings.

The flash vs. SVG debate has been going on for a while now. It seems the most hard stances on the issue are from folks with real vested interest (i.e. skills or products) in either one of the approaches. Because so many cartographers were(are) involved in the development of SVG standards I would think that the format was probably better suited. The only advantage (IMO) that flash has is wide spread adoption. Although now that Adobe owns flash I'm not sure how much of a future SVG has.

#14
Matthew Hampton

Matthew Hampton

    Hall of Fame

  • Moderator
  • PipPipPipPipPipPipPip
  • 1,289 posts
  • Gender:Male
  • Location:Portland, Oregon
  • Interests:Playing in the mountains and rivers.
  • United States

There are a couple of pretty good third-party add-ons for ArcGIS that do SVG export without any need for customization.

I have really enjoyed using MapViewSVG in the past too and think the extension is quite powerful.

I recently heard the new release of ArcGIS (9.2) will add more support to their SVG export. You can export SVG currently with 9.1 but only the linework is carried over - no data.

ESRI's SVG press release can be found here.

Oregon Metro - Portland, OR
www.oregonmetro.gov


#15
Kartograph

Kartograph

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 319 posts
  • Gender:Male
  • Location:Berlin, Deutschland
  • Germany

I'm not sure how much of a future SVG has.


The 1.2 Spec is in the works, and it looks neat so far. So at least there is progress. And SVG is developed by others than "just" Adobe, all the companies selling user agents/players for example, like BitFlash.
I´m not dogmatic about SVG, it´s just the one I learned first, but SWF can surely fit your bill most of the time. But still there are misconceptions about SVG without need.
I haven´t seen the killer app for maps neither in Flash, nor in SVG, although I´ve seen some pretty neat stuff.
Google´s brute forcing raster tiles through the web is much better right now.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->