Monday, August 18, 2008

Gmaps: GEvent and "a is not defined"

I was getting the (generic and fairly common) "a is not defined" (on line 287 of main.js I believe) javascript error with gmaps when trying to add a GEvent click event listener. I intially thought it was an issue with my some map layers with ArcGIS Javascript Extension for Google Maps, but I resolved this issue by sticking the even handler in the initialize function. For some reason gmaps must not have been available at the scope of the even handler outside this function ... the gmap object was being instantiated inside this function, yet the variable was first declared outside the function in the first lines of the application ... strange.

Thursday, August 14, 2008

Flash Map Workflow, described

Thematic groups created in ArcMap and enhanced with Adobe Illustrator (AI), were saved as separate AI files (by region) and further organized as AI “layers.” Note that a layer should be created for every group of shapes which would be always dealt with in the same way in an animation. For example, if a group of lines would appear and disappear together and never separately, they should be organized into a layer. These layers later correspond to symbols in the Flash application. All layers were then selected and copied/pasted into Flash at once. Flash has the ability to implicitly import AI layers as Flash layers copied and pasted into it. Note that the “paste in place” command should be used in order to guarantee uniform positioning across layers copied/pasted from different AI files -- the dimensions of the Flash canvas must be the same as the AI document for this to work.

The Flash Actionscript program then deals with all user interaction and data display. Symbols are displayed/not displayed, fade in/out, or are magnified based on program functions referencing the symbols indicated by other user interface symbols (buttons, etc.) which are invoked by user interaction.

New Tool: Map Extent Calculator

I just created a small tool for calculating decimal degree map extents :

you can access it here

Monday, August 11, 2008

add arcgis service remotely from arccatalog

when adding a service to a remote arcgis server you cannot browse to the actual location of the mxd or geodatabase on the remote server. windows file sharing addresses do not work. you must use the address on the local machine exactly as if you were accessing the mxd from the local machine.

Tuesday, August 5, 2008

this is a nice pear db query which returns an associative array

$data = $sqlconnectionobject ->getAssoc('sql statement here',true, array(), DB_FETCHMODE_ASSOC, true);

if (PEAR::isError($data)) {

Friday, August 1, 2008

Setting up a Tiling/Caching Google Maps/ArcGIS Server Solution

Setting up a Setting up a Tiling/Caching Google Maps/ArcGIS Server Solution has gotten much easier with the advent of ArcGIS Server 9.3 and its REST-ful Javascript API. Specifically, the ArcGIS JavaScript Extension for Google Maps makes creating this kind of mashup almost a breeze ;)

added 8/20/08: this link at an ESRI site really helped a lot

1. reproject shapefiles into world mercator web projection (only available in 9.3)

2. add new service from mxd containing that/those shapefiles

3. enable tiling in the "service properties" for your web service. You should use the google/virtual earth tiling scheme

4. paste the service url into the example code for the extension