My application: IIS7, ColdFusion, database MySQL, Flex 4, Google Map API
Hi
In defense of my diploma thesis I have to make application. The project application is this: An application that allows you to incorporate photos and map geolocation data read from the recording device GPS position. The whole can for example play performed by our tours, in addition to plotting the data entered by us. For this project I want to use Google Map API. The concept of project is this: I would like to send using ColdFusion to the database MySQL. GPS data and photos. There is little material on the Internet to combine Adobe Flash Builder (Flex 4) with ColdFusion.
Could you help me with my project?
Thank you!
Application similar to this:
http://www.txtracks.com/mt-bike-trails-map.cfm
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
xmlns:maps="com.google.maps.*">
<fx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.controls.MapTypeControl;
import com.google.maps.controls.ZoomControl;
import com.google.maps.overlays.Marker;
import com.google.maps.overlays.MarkerOptions;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
private function onMapReady(event:MapEvent):void
{
map.setCenter(new LatLng(50.1790184, 18.9038037), 8,MapType.NORMAL_MAP_TYPE);
map.addControl(new ZoomControl);
map.addControl(new MapTypeControl);
service.send();
}
private function onResult(event:ResultEvent):void
{
var list:ArrayCollection = event.result.map.loc;
for (var i:int=0; i<list.length; i++)
{
var m:Marker = new Marker(new LatLng(list.lat, list.lon),
new MarkerOptions({tooltip:list.name}));
map.addOverlay(m);
}
}
]]>
</fx:Script>
<fx:Declarations>
<s:HTTPService id="service" url="http://localhost/Application_1-debug/services/markersService.cfc" result="onResult(event)"/>
</fx:Declarations>
<maps:Map id="map"
key="ABQIAAAAYEnmmVuqT8hWQYzqt_vrUBTvyqiIex-9051tKK-jtQpGXvneuBTd0DxyoLadpNRbahLZlzpK5lSCdg"
width="100%" height="100%"
sensor="false"
mapevent_mapready="onMapReady(event)"/>
</s:Application>
Source code database MySQL
CREATE TABLE `markers` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` VARCHAR( 60 ) NOT NULL ,
`lat` FLOAT( 10, 6 ) NOT NULL ,
`lng` FLOAT( 10, 6 ) NOT NULL
) ENGINE = MYISAM ;
INSERT INTO google_map.markers (name, lat, lng) VALUES ('Mikolow', '50.1790184', '18.9038037');
INSERT INTO google_map.markers (name, lat, lng) VALUES ('Katowice', '50.2648919', '19.0237815');
INSERT INTO google_map.markers (name, lat, lng) VALUES ('Gliwice', '50.2944923', '18.6713802');
INSERT INTO google_map.markers (name, lat, lng) VALUES ('Chorzów', '50.2974884', '18.9545728');
I have configured IIS7 with ColdFusion 9.
I created a MySQL database.
I added it to the ColdFusion 9 server and then I configured it to Flex 4
Don't show me the markers on the map.
Regards
