Map marker + geolocation (google maps)
I'm currently working on embedding a google map in my app. The geolocating already works ( I used this code: DPS Tips HTML5 Examples, thanks Bob!), but I just can't add markers to the map. I tried different codes but none seem to work. I would also need the markers to have their names shown (e.g. hotspot 1, hotspot 2).
Has anyone here found a solution for this and would be kind enough to share?
Thanks in advance!
hi! I used the code for geolocation from the link above, and this code for the marker: Simple markers - Google Maps JavaScript API v3 — Google Developers
It both works independently, but I can't mix them. I also can't find a way to modify my marker ( own icon) and add an info box.
I tried some of the following links to try and work those aspects to the marker file, if it helps with finding a solution:
LabeledMarker Documentation: Examples
Adding dynamic content to Google Maps marker - Stack Overflow
map-geolocation-with-fancy-marker.html - gmaps-samples-v3 - Google Maps API v3 Sample Code - Google Project Hosting
Similar Messages
-
Mapping Prospects on google map
Has anyone attempted to put a web applet of a google/yahoo map which will plot the location of my customer (I have done so much) and then show all my prospects in a 10 mile radius. The prospects should come from CRM OD.
If anyone has attempted this, I would really appreciate the help.Plugins...... I guess that depends on what you mean.
CRMOD offers a WSDL that gives you the ability to perform possibly everything that can be done from within CRMOD itsefl. Bungee Connect will import the WSDL, listing the functions inside of a dev environment, making it fairly easy to see what type of operation can be performed on each object.
For example, I just finished coding an application to maintain contact information in the CRMOD. I imported the Contact WSDL which brought two libraries of CRMOD objects into my development project. Choosing the operations and passing the correct object types to each function is fairly simple. I am polishing up this simple application and it should be available to the public by Monday. It will be a great example of how to connect to CRMOD and begin pushing data back and forth.
On the Google Maps side, since Google Maps requires a lot of javascript to interact with, we have simplified interaction by creating a Google Maps control that you can drag and drop onto a form just like any other label, button, etc. We have examples of how to do this in our documentation. So once you get connected to CRMOD, it's really just a matter of formatting the data to allow the Google Map control to read it. -
Hi there. I am creating an iPad app with In Design CS5.5. I want to add a link from an image with a button to a Google map showing where the image was taken. I can successfully add the map and load it but I cannot find out how to add the marker showing the exact location. I also want earth view to appear rather than street maps. Hope somebody can help. Many thanks in advance. Ian Brodie
Hi Ian
Dont know if this will help, but this pages shows how to define a url to a specific point on a map, ie with postcodes etc
Cheers
Alistair
https://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articl es/MapLinks.html%23//apple_ref/doc/uid/TP40007894-SW1 -
Input for Mobile Devices: GeoLocation/Google Maps | ADC Presents | Adobe TV
Geolocation is a top feature on mobile devices. In this video Paul Trani explains how to use the GPS coordinates of a device and plot the coordinates on a Google Map.
http://adobe.ly/wq4jdrI cannot find any information about how to take this a step further and plot a route between my current location and a hard-coded store. Also, I have some purchased apps that map out where I jogged using points every kilometer and a line connecting them. Again, I can find no information about how to do this using Flash CS6.
-
How to open a google map link in google maps app?
Hello,
I would like to post a link to a custom google map on my blog that could be open on Iphone with the google maps app. Someone would have an idea?
There maybe a solution with google map url scheme ("comgooglemaps:") but I don't see how to implement it
Thanks in advance!
The map:
https://maps.google.fr/maps/ms?msid=218162555454264993409.0004ddc647279c6f0bde0& msa=0&ll=46.149394,2.329102&spn=16.974756,19.02832I think this is not possible as a link on the iPhone will default to the Apple Maps app and there is no way to change this.
-
N97 Ovi maps clashing with Google maps or sports t...
I have a UK Vodafone N97, Had Ovi maps working a treat and really pleased with it. However, I just installed google maps and then Nokia Sports tracker. Sports tracker wouldn't "track " at all and this then stopped Ovi maps from finding a signal.
However, Google maps finds 3-5 satellites and plots very quickly so I know the GPS receiver is working fine.
I uninstalled Sports tracker and Google maps, deleted all Ovi map data and did a soft reset, then re-installed Ovi maps for the UK ( I can not delete Ovi maps app from the phone, software V21)
I still cannot get a lock with Ovi maps but having put Google maps back on, that works fine!!
Any thoughts other than a hard reset as I have so much installed on the phone.
Thanks,
MartinGoogle maps uses a different server, and installing it may have changed the server settings in the phone location settings. Go to Menu>Apps>Location>Positioning>Positioning Server> make sure that the server is still supl.nokia.com
If you find my post helpful please click the green star on the left under the avatar. Thanks. -
N97 Nokia maps "System error" / google maps won't ...
Since my N97 was unboxed Nokia maps has refused to load, it just beeps and says "System error". That's it! Any clues on how to get this working? It's pretty annoying as it's one feature I was looking forward to using.
Funnily enough I installed google maps and that won't open either, but there's no error message, it just makes the screen blink once then back to the menu.
Any advice appreciated
Solved!
Go to Solution.One more big NEGATIVE point for Nokia....
You needed to restore the default factory settings for solve the system erros in the Nokia Maps???!
(I have the same problem...) Tsc Tsc....
Nokia WAKE UP for several problems with the N97 model!!!
Work hard for a calendar and system betters, more quickly to backup in desktop computer, include.
Learn something important features with the Palm calendar smartphone, repetitive meets and memos in days or weeks, for example.
(I have a Palm Treo smartphone also. The Nokia n97, calendar, system, etc. is lefting with missing of my old phone....) -
IOS6 - Terrible Maps - When is Google Maps coming back
I have just installed iOS6 and I am so disappointed with the new Maps application. Steve Jobs would have never allowed such a mediocre application to be included in the iOS.
Apple, please bring back Google Maps so that we can actually use for our real life!I agree, I dont like the new maps app at all. Its slow to load the map compared to how google used to load where Im at. I updated to ios 6 on my 4S this morning and am very dissapointed in the maps app.
The location is wrong, maps are old in satellite view.
I tried to get a route from my current location to home and got the message directions could not be found between these two locations.
I heard they get the data from tomtom, so why is it that my actual tomtom in my truck is much better at getting directions than this new map app? surely they should have the same data updates.....
Ive resorted to hiding the apple map app on a homescreen page and adding the shortcut to maps.google.com on my home screen instead. Hopefully they will update it to where it is actually working better soon. I doubt they will ditch it with investing so much in mapping companies etc. but they could at least get it working better. -
How to launch map application from google map link
Hello,
I am looking to find a way to have the map application on an iphone launch when someone opens this link from a website on their phone:
http://maps.google.com/maps/ms?msa=0&msid=217423717566822591594.0004bb60e527aee0 3991b&mid=1338478668
It only seems to open the map in safari and I can't find anything about how to change this by searching the web. Any help would be appreciated.
Thanks,
SteveI do not see the parameters you are using in the list of supported parameters. Can you express that same position using the supported parameters?
Apple URL Scheme Reference - Map Links
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Referen ce/Articles/MapLinks.html
Parameter
Notes
q=
The query parameter. This parameter is treated as if it had been typed into the query box by the user on the maps.google.com page. q=* is not supported
near=
The location part of the query.
ll=
The latitude and longitude points (in decimal format, comma separated, and in that order) for the map center point.
sll=
The latitude and longitude points from which a business search should be performed.
spn=
The approximate latitude and longitude span.
sspn=
A custom latitude and longitude span format used by Google.
t=
The type of map to display.
z=
The zoom level.
saddr=
The source address, which is used when generating driving directions
daddr=
The destination address, which is used when generating driving directions.
latlng=
A custom ID format that Google uses for identifying businesses.
cid=
A custom ID format that Google uses for identifying businesses. -
Hi,
I am currenly developing application implementing Google Map sharing with Adobe LCCS and Flex for Android. I have a problem building the shared model of the google map, is there anyone who could show me any example regarding this as I could'nt found any. Any help is appreciated. Thx.
Regards
TanI didn't manage to get the Yahoo Map example running, so I went through it to get the important script to build the google map sharing. My source folder has only 3 files which i think suppose to be able to generate the Google Map.I login straight using my developer account.Below is the full list of log messages and I attached along the three scripts I've written...
Log messages:
[SWF] GoogleMap.swf - 2,651,420 bytes after decompression
Tue Mar 8 04:56:58 GMT+0800 2011 LCCS SDK Version : 1.3.7.1 Player Version : WIN 10,1,85,3
04:56:58 GMT+0800 requestInfo https://collaboration.adobelivecycle.com/yytan1987/myfirstroom?mode=xml&glt=g:&x=0.5164360 296912491
[SWF] /mapsapi/publicapi - 4,125 bytes after decompression
[SWF] /mapfiles/lib/map_1_20.swf - 317,303 bytes after decompression
[SWF] /mapsapi/publicapi - 790 bytes after decompression
04:57:08 GMT+0800 authentication status: 200
04:57:08 GMT+0800 authentication request complete
04:57:08 GMT+0800 requestInfo https://collaboration.adobelivecycle.com/yytan1987/myfirstroom?gak=cmVuZ2EqbmExcioxMmU5MjF iZjY0MSpKRDVETTdBM1pON1NTQVQwN0JWUjBCNTY5Qw==&mode=xml&x=0.6678212475962937
04:57:11 GMT+0800 #TicketService# ticket received: 26tkbnwc3t7z
04:57:11 GMT+0800 Getting FMS at https://na2.collaboration.adobelivecycle.com/fms?ticket=26tkbnwc3t7z&proto=rtmfp, attempt #1/3
04:57:12 GMT+0800 result: <fms>
<origin>fms2.acrobat.com</origin>
<proto_ports>rtmfp:1935,rtmps:443</proto_ports>
<retry_attempts>2</retry_attempts>
</fms>
04:57:12 GMT+0800 protocols: [object ProtocolPortPair],[object ProtocolPortPair]
04:57:12 GMT+0800 [attempt 1 of 2] Connecting to 0/1: rtmfp://fms2.acrobat.com/cocomo/na2-sdk-de21bd7d-e997-46a3-b4a2-33bf56efa416/myfirstroom #startProtosConnect#
04:57:14 GMT+0800 tempNetStatusHandler 0/2,NetConnection.Connect.Success
04:57:14 GMT+0800 isTunneling? false
04:57:14 GMT+0800 is using RTMPS? false
04:57:14 GMT+0800 RECEIVED LOGIN AT SESSION
04:57:14 GMT+0800 .user descriptor from server [object]
04:57:14 GMT+0800 \\
04:57:14 GMT+0800 .role [number]= 100
04:57:14 GMT+0800 .affiliation [number]= 100
04:57:14 GMT+0800 .userID [string]= WCD-2A9F0D364CAC939C0A746C1B/6
04:57:14 GMT+0800 .displayName [string]= YY Tan 6
04:57:15 GMT+0800 RECEIVENODES UserManager
04:57:15 GMT+0800 receiveAllSynchData UserManager
04:57:15 GMT+0800 RECEIVENODES FileManager
04:57:15 GMT+0800 receiveAllSynchData FileManager
04:57:15 GMT+0800 checkManagerSync:[object FileManager]
04:57:16 GMT+0800 RECEIVENODES AVManager
04:57:16 GMT+0800 receiveAllSynchData AVManager
04:57:16 GMT+0800 checkManagerSync:[object StreamManager]
04:57:16 GMT+0800 RECEIVENODES RoomManager
04:57:16 GMT+0800 receiveAllSynchData RoomManager
04:57:16 GMT+0800 checkManagerSync:[object RoomManager]
04:57:16 GMT+0800 checkManagerSync:[object UserManager]
04:57:17 GMT+0800 RECEIVENODES sharedMap
04:57:17 GMT+0800 receiveAllSynchData sharedMap
Error: MessageManager.getRootUserRole - This user doesn't exist.
at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::getRootUserRole()[/Users/arun /Work/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/ com/adobe/rtc/messaging/manager/MessageManager.as:454]
at com.adobe.rtc.sharedModel::CollectionNode/getRootUserRole()[/Users/arun/Work/aponnusa_the oden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/shar edModel/CollectionNode.as:883]
at com.adobe.rtc.sharedModel::CollectionNode/getUserRole()[/Users/arun/Work/aponnusa_theoden .corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/sharedMo del/CollectionNode.as:471]
at com.adobe.rtc.sharedModel::CollectionNode/canUserConfigure()[/Users/arun/Work/aponnusa_th eoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/sha redModel/CollectionNode.as:593]
at SharedMapModel/onSyncChange()[C:\Users\Compaq\Adobe Flash Builder 4\GoogleMap\src\SharedMapModel.as:185]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.rtc.sharedModel::CollectionNode/http://www.adobe.com/2006/connect/cocomo/messaging/internal::setIsSynchronized()[/Users/ar un/Work/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/sr c/com/adobe/rtc/sharedModel/CollectionNode.as:700]
at com.adobe.rtc.messaging.manager::MessageManager/receiveAllSynchData()[/Users/arun/Work/ap onnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adob e/rtc/messaging/manager/MessageManager.as:851]
at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::receiveItems()[/Users/arun/Wo rk/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com /adobe/rtc/messaging/manager/MessageManager.as:596]
at com.adobe.rtc.session.managers::SessionManagerBase/receiveItems()[/Users/arun/Work/aponnu sa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rt c/session/managers/SessionManagerBase.as:456]
GoogleMap.mxml(main):
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:rtc="http://ns.adobe.com/rtc"
xmlns:maps="com.google.maps.*"
xmlns:ns2="*">
<maps:Map mapevent_mapready="onReady(event)" url="http://code.google.com/apis/maps/" id="map" width="100%" height="100%" key="ABQIAAAAa1d-LRFOUL0Fhv8VJsT-JhROcIOxpjBZUVD7XRlGFELYl3GNYxQIzt1g1Bnuf1QsKZfb47Zk7_c6 Bw" sensor="true" x="0" y="0"/>
<fx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapMoveEvent;
import com.google.maps.MapOptions;
import com.google.maps.MapType;
import com.google.maps.MapZoomEvent;
import com.google.maps.controls.ZoomControl;
import com.google.maps.overlays.Marker;
import com.google.maps.overlays.MarkerOptions;
import com.google.maps.styles.FillStyle;
import com.google.maps.styles.StrokeStyle;
import flash.events.GeolocationEvent;
import flash.sensors.Geolocation;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import mx.events.FlexEvent;
protected var _sharedMapModel:SharedMapModel;
private var zoomControl:ZoomControl = new ZoomControl();
private function onReady(e:MapEvent):void{
this.map.visible = false;
this.map.setCenter(new LatLng(45.468799,9.188004),14, MapType.NORMAL_MAP_TYPE);
addMapControls();
setupSharedMap();
private function addMapControls():void {
map.addControl(zoomControl);
private function removeMapControls():void {
map.removeControl(zoomControl);
private function setupMapListeners():void {
map.addEventListener(MapMoveEvent.MOVE_END, onMapMoveEnd);
map.addEventListener(MapZoomEvent.ZOOM_CHANGED, onMapZoom);
private function setupSharedMap():void {
_sharedMapModel = new SharedMapModel();
_sharedMapModel.subscribe("sharedMap");
_sharedMapModel.addEventListener("subscribe",onSubscribed);
_sharedMapModel.addEventListener("latLngChange",onPositionChange);
_sharedMapModel.addEventListener("zoomChange",onZoomChange);
private function onSubscribed(p_evt:Event=null):void {
_sharedMapModel.removeEventListener("subscribe",onSubscribed);
setupMapListeners();
this.map.visible = true;
private function onMapMoveEnd(event:MapMoveEvent):void {
_sharedMapModel.latLng = this.map.getCenter();
protected function onPositionChange(p_evt:Event=null):void {
this.map.removeEventListener(MapMoveEvent.MOVE_END, onMapMoveEnd);
this.map.setCenter(_sharedMapModel.latLng);
this.map.addEventListener(MapMoveEvent.MOVE_END, onMapMoveEnd);
private function onMapZoom(event:MapZoomEvent):void {
_sharedMapModel.zoom = this.map.getZoom();
protected function onZoomChange(p_evt:Event=null):void {
this.map.removeEventListener(MapZoomEvent.ZOOM_CHANGED, onMapZoom);
this.map.setZoom(_sharedMapModel.zoom);
this.map.addEventListener(MapZoomEvent.ZOOM_CHANGED, onMapZoom);
]]>
</fx:Script>
<fx:Declarations>
<rtc:AdobeHSAuthenticator id="auth"
userName="[email protected]"
password="password"
/>
</fx:Declarations>
<rtc:ConnectSessionContainer width="100%" height="100%"
roomURL="https://collaboration.adobelivecycle.com/yytan1987/myfirstroom"
id="cSession"
authenticator="{auth}">
</rtc:ConnectSessionContainer>
</s:WindowedApplication>
SharedMapModel.as:
package
import com.adobe.rtc.events.CollectionNodeEvent;
import com.adobe.rtc.events.SharedModelEvent;
import com.adobe.rtc.messaging.MessageItem;
import com.adobe.rtc.session.ConnectSession;
import com.adobe.rtc.sharedModel.Baton;
import com.adobe.rtc.sharedModel.CollectionNode;
import com.adobe.rtc.sharedModel.SharedCollection;
import com.google.maps.LatLng;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
public class SharedMapModel extends EventDispatcher
// fired when the position of the map has been changed
[Event(name="latLngChange", type="flash.events.Event")]
// fired when the zoom level of the map has been changed
[Event(name="zoomChange", type="flash.events.Event")]
// fired when the mode of the map (annotation or navigation) has been changed
[Event(name="modeChange", type="flash.events.Event")]
// fired when the contolling user of the map has been changed
[Event(name="batonChange", type="flash.events.Event")]
[Event(name="subscribe", type="flash.events.Event")]
protected var _latLng:LatLng;
protected var _zoom:int;
protected var _mode:String;
protected var _collectionNode:CollectionNode;
protected var _myUserID:String;
protected var _controllingUser:String;
protected var _baton:Baton;
public var markerCollection:SharedCollection = new SharedCollection();
protected static const LAT_LNG_NODE:String = "latLngNode";
protected static const ZOOM_NODE:String = "zoomNode";
protected static const MODE_NODE:String = "modeNode";
public function SharedMapModel(target:IEventDispatcher=null)
super(target);
[Bindable("subscribe")]
public function subscribe(p_uniqueID:String):void
_myUserID = ConnectSession.primarySession.userManager.myUserID;
// set up the collectionNode
_collectionNode = new CollectionNode();
_collectionNode.sharedID = p_uniqueID ;
_collectionNode.subscribe();
_collectionNode.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncChange);
_collectionNode.addEventListener(CollectionNodeEvent.ITEM_RECEIVE, onItemReceive);
// set up the marker collection - CocomoCollection allows you to specify an existing
// collectionNode to use for messaging, so we'll have it piggy-back on the same
// collectionNode as the one our model uses (to reduce the number of destinations on server)
markerCollection.collectionNode = _collectionNode;
// use the userID field as the unique ID for each item in the collection
markerCollection.idField = "userID";
// use one node on our collectionNode for marker details
markerCollection.subscribe();
// set up the baton. we'll also have it piggy-back on our existing collectionNode.
_baton = new Baton();
_baton.sharedID = "mapControl" ;
_baton.timeOut = 5 ;
_baton.collectionNode = _collectionNode ;
_baton.subscribe();
_baton.addEventListener(SharedModelEvent.BATON_HOLDER_CHANGE, onBatonChange);
* Sets the position of the SharedMap model. Note that the value isn't updated until the resulting
* message returns from the service.
* @param p_val - the LatLon object corresponding to the map's position
public function set latLng(p_val:LatLng):void
// baton management - if I've got the baton already, then keep it for a while longer,
// if I don't but can grab it, do so. Otherwise, I'm not allowed to update this value.
if (_baton.amIHolding) {
_baton.extendTimer();
} else if (_baton.canIGrab) {
_baton.grab();
} else {
return;
// send a message (through our collectionNode) to the service to update the position.
// note that LAT_LON_NODE is configured to only store a single item (see onSyncChange),
// so only the last item published here gets stored
var msg:MessageItem = new MessageItem(LAT_LNG_NODE, {lat:p_val.lat, lng:p_val.lng});
_collectionNode.publishItem(msg);
[Bindable("latLngChange")]
public function get latLng():LatLng
return _latLng;
* Sets the zoom level of the SharedMap model. Note that the value isn't updated until the resulting
* message returns from the service.
* @param p_val - the LatLon object corresponding to the map's position
public function set zoom(p_val:int):void
// baton management - if I've got the baton already, then keep it for a while longer,
// if I don't but can grab it, do so. Otherwise, I'm not allowed to update this value.
if (_baton.amIHolding) {
_baton.extendTimer();
} else if (_baton.canIGrab) {
_baton.grab();
} else {
return;
// send a message (through our collectionNode) to the service to update the zoom level.
// note that ZOOM_NODE is configured to only store a single item (see onSyncChange),
// so only the last item published here gets stored
var msg:MessageItem = new MessageItem(ZOOM_NODE, p_val);
_collectionNode.publishItem(msg);
[Bindable("zoomChange")]
public function get zoom():int
return _zoom;
* Sets the mode (annotation or navigation) of the SharedMap model.
* Note that the value isn't updated until the resulting
* message returns from the service.
* @param p_val
public function set mode(p_val:String):void
// baton management - if I've got the baton already, then keep it for a while longer,
// if I don't but can grab it, do so. Otherwise, I'm not allowed to update this value.
if (_baton.amIHolding) {
_baton.extendTimer();
} else if (_baton.canIGrab) {
_baton.grab();
} else {
return;
// send a message (through our collectionNode) to the service to update the mode.
// note that MODE_NODE is configured to only store a single item (see onSyncChange),
// so only the last item published here gets stored
var msg:MessageItem = new MessageItem(MODE_NODE, p_val);
_collectionNode.publishItem(msg);
[Bindable("modeChange")]
public function get mode():String
return _mode;
* returns the userID of the user currently controlling the map
[Bindable("batonChange")]
public function get controllingUser():String
return _controllingUser;
* Fired when the collectionNode has fully connected to the service and retrieved all information
* about its nodes and stored message items. Note that this is typically the time when an OWNER sets up
* the node structure of any CollectionNodes, after the CollectionNode has synched and the OWNER notices
* it hasn't got the requisite nodes.
protected function onSyncChange(p_evt:CollectionNodeEvent):void
// if I'm the OWNER and there's no node defined for LAT_LON, create one.
// note we're using the default NodeConfiguration, which only stores one item and has default
// publish/subscribe permissions.
if (!_collectionNode.isNodeDefined(LAT_LNG_NODE) && _collectionNode.canUserConfigure(_myUserID)) {
_collectionNode.createNode(LAT_LNG_NODE);
// if I'm the OWNER and there's no node defined for ZOOM, create one.
if (!_collectionNode.isNodeDefined(ZOOM_NODE) && _collectionNode.canUserConfigure(_myUserID)) {
_collectionNode.createNode(ZOOM_NODE);
// if I'm the OWNER and there's no node defined for MODE, create one.
if (!_collectionNode.isNodeDefined(MODE_NODE) && _collectionNode.canUserConfigure(_myUserID)) {
_collectionNode.createNode(MODE_NODE);
* Fired when an item is received from the service (whether from the current user's updates
* or a remote one).
protected function onItemReceive(p_evt:CollectionNodeEvent):void
if (p_evt.nodeName==LAT_LNG_NODE) {
// the latlon has been updated. Update our model value, and fire an event to notify of the change
_latLng = new LatLng(p_evt.item.body.lat, p_evt.item.body.lng);
if (p_evt.item.publisherID!=_myUserID) {
dispatchEvent(new Event("latLngChange"));
} else if (p_evt.nodeName==ZOOM_NODE) {
// the zoom has been updated. Update our model value, and fire an event to notify of the change
_zoom = p_evt.item.body;
dispatchEvent(new Event("zoomChange"));
} else if (p_evt.nodeName==MODE_NODE) {
// the mode has been updated. Update our model value, and fire an event to notify of the change
_mode = p_evt.item.body;
dispatchEvent(new Event("modeChange"));
* Fired when the holderID of the baton changes. We update our model value and fire an event to notify of the change
protected function onBatonChange(p_evt:Event):void
_controllingUser = _baton.holderID;
dispatchEvent(new Event("batonChange"));
AfcsCollection.as:
package
import mx.collections.ArrayCollection;
import com.adobe.rtc.sharedModel.CollectionNode;
import com.adobe.rtc.messaging.NodeConfiguration;
import com.adobe.rtc.events.CollectionNodeEvent;
import com.adobe.rtc.messaging.MessageItem;
import mx.core.IUID;
import com.adobe.rtc.session.ConnectSession;
[Event(name="synchronizationChange", type="com.adobe.rtc.events.CollectionNodeEvent")]
public class AfcsCollection extends ArrayCollection
public function AfcsCollection(source:Array=null)
super(source);
public var collectionNode:CollectionNode;
protected static const ITEM_NODE:String = "itemNode";
protected var _nodeConfig:NodeConfiguration;
protected var _nodeName:String = ITEM_NODE;
protected var _myUserID:String;
* what field in each item can be used as a unique identifier?
public var idField:String;
* what class is each item?
public var itemClass:Class;
[Bindable("synchronizationChange")]
public function get isSynchronized():Boolean
if (collectionNode) {
return collectionNode.isSynchronized;
} else {
return false;
public function subscribe(p_uniqueID:String, p_nodeConfig:NodeConfiguration=null):void
_nodeConfig = (p_nodeConfig) ? p_nodeConfig : new NodeConfiguration();
_nodeConfig.itemStorageScheme = NodeConfiguration.STORAGE_SCHEME_MANUAL;
_myUserID = ConnectSession.primarySession.userManager.myUserID;
if (collectionNode==null) {
collectionNode = new CollectionNode();
collectionNode.sharedID = p_uniqueID ;
collectionNode.subscribe();
} else {
_nodeName = p_uniqueID;
collectionNode.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncChange);
collectionNode.addEventListener(CollectionNodeEvent.ITEM_RECEIVE, onItemReceive);
collectionNode.addEventListener(CollectionNodeEvent.ITEM_RETRACT, onItemRetract);
override public function setItemAt(p_item:Object, p_index:int):Object
var oldItem:Object = getItemAt(p_index);
var msg:MessageItem = new MessageItem(_nodeName, p_item, getItemID(oldItem));
collectionNode.publishItem(msg, true);
return oldItem;
override public function addItem(p_item:Object):void
var msg:MessageItem = new MessageItem(_nodeName, p_item, getItemID(p_item));
collectionNode.publishItem(msg);
override public function removeItemAt(p_index:int):Object
var oldItem:Object = getItemAt(p_index);
collectionNode.retractItem(_nodeName, getItemID(oldItem));
return oldItem;
override public function removeAll():void
var l:int = length;
for (var i:int=l-1; i>=0; i--) {
removeItemAt(i);
protected function onSyncChange(p_evt:CollectionNodeEvent):void
if (!collectionNode.isNodeDefined(_nodeName) && collectionNode.canUserConfigure(_myUserID, _nodeName)) {
// this collectionNode has never been built, and I can add it...
collectionNode.createNode(_nodeName, _nodeConfig);
dispatchEvent(p_evt);
protected function onItemReceive(p_evt:CollectionNodeEvent):void
if (p_evt.nodeName!=_nodeName) {
return;
var newItem:Object = p_evt.item.body;
var itemID:String = (idField) ? newItem[idField] : newItem.uid;
var oldItem:Object;
var i:String;
// yes, this is ugly. Improve later
var l:int = length;
for (var idx:int=0; idx<l; idx++) {
if (itemID==getItemID(getItemAt(idx))) {
oldItem = getItemAt(idx);
break;
if (oldItem) {
// it's an item update
for (i in newItem) {
if (newItem[i]!=oldItem[i]) {
var tmpOldValue:Object = oldItem[i];
oldItem[i] = newItem[i];
itemUpdated(oldItem, i, tmpOldValue, oldItem[i]);
super.setItemAt(oldItem, idx);
} else {
// it's a brand new item
if (itemClass) {
// yeah, this wouldn't work if there are constructor args
var newItemTyped:Object = new itemClass();
for (i in newItem) {
newItemTyped[i] = newItem[i];
super.addItem(newItemTyped);
} else {
super.addItem(newItem);
protected function onItemRetract(p_evt:CollectionNodeEvent):void
if (p_evt.nodeName!=_nodeName) {
return;
var newItem:Object = p_evt.item.body;
var itemID:String = (idField) ? newItem[idField] : newItem.uid;
var oldItem:Object;
// yes, this is ugly. Improve later
var l:int = length;
for (var idx:int=0; idx<l; idx++) {
if (itemID==getItemID(getItemAt(idx))) {
oldItem = getItemAt(idx);
break;
if (oldItem) {
super.removeItemAt(idx);
protected function getItemID(p_item:Object):String
return (p_item is IUID) ? IUID(p_item).uid : p_item[idField] as String; -
Adobe Widget browser "Google Map" Search box for address
First of all I would like to thank Zizzer Zazzer for this google map. I ts really very helpful for the website. I was wondering if this is possible to add text search box for the address in google map? I was trying my self and tried with geocode with no success.If any one of you know about this then plz let me know. Here is my code
<input type="text" id="search_address" value="" size="98"/>
<button onclick="search();">Search</button>
<div id="mapCanvas" style="width:100%; height:100%; min-width:300px; min-height:300px"></div>
<script type="text/javascript">
// initialize the google Maps
function initializeGoogleMap() {
// set latitude and longitude to center the map around
var latlng = new google.maps.LatLng(37.77,
-122.4);
// set up the default options
var myOptions = {
zoom: 8,
center: latlng,
navigationControl: true,
navigationControlOptions:
{style: google.maps.NavigationControlStyle.DEFAULT,
position: google.maps.ControlPosition.TOP_LEFT },
mapTypeControl: true,
mapTypeControlOptions:
{style: google.maps.MapTypeControlStyle.DEFAULT,
position: google.maps.ControlPosition.TOP_RIGHT },
scaleControl: true,
scaleControlOptions: {
position: google.maps.ControlPosition.BOTTOM_LEFT
mapTypeId: google.maps.MapTypeId.ROADMAP,
draggable: true,
disableDoubleClickZoom: false,
keyboardShortcuts: true
var map = new google.maps.Map(document.getElementById("mapCanvas"), myOptions);
if (true) {
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map);
if (true) {
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map);
if (true) {
addMarker(map,37.7715,-122.4,"We are here");
window.onload = initializeGoogleMap();
// Add a marker to the map at specified latitude and longitude with tooltip
function addMarker(map,lat,long,titleText) {
var markerLatlng = new google.maps.LatLng(lat,long);
var marker = new google.maps.Marker({
position: markerLatlng,
map: map,
title:"We are here",
icon: ""});
var addressField = document.getElementById('search_address');
var geocoder = new google.maps.Geocoder();
function search() {
geocoder.geocode(
{'address': addressField.value},
function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var loc = results[0].geometry.location;
// use loc.lat(), loc.lng()
else {
alert("Not found: " + status);Come on guys....!!Any one here to answer or any one knows about it?
-
Hi, I've been researching embedding google maps in Flash and have followed the Google Maps API developers guide (after downlaoding and installing the SDK and generating a key). I'm currently using the foloowing code,m but it doesnt seem to work I'm not even seeing the map, and Im getting errors relating to the controls elements I've added. Can anyone help?
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.Controls;
var map:Map = new Map();
map.key = "ABQIAAAAdrPixq2HTFFowI9qjk74wxRIyoY1_2mmZno9JS0jJW-gT85BPRRotnr4suVY_4iicnk27GnnECcjXQ";
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
map.addEventListener(MapEvent.MAP_READY, onMapReady);
this.addChild(map);
function onMapReady(event:Event):void {
map.addControl(new ZoomControl());
map.addControl(new PositionControl());
map.addControl(new MapTypeControl());
map.setCenter(new LatLng(53.535192,-2.00475), 14, MapType.NORMAL_MAP_TYPE);
var m:Marker = new Marker(new LatLng(53.535192,-2.00475));
map.addOverlay(m);Hi there. I downloaded the SDK myself and managed to solve your problem. It's because of your imports.
First of all make sure the .swc file is in your library ( found in the lib folder called "map_1_18" )
(Whilst in Flash) Press Ctrl+U to open up the preferences, then go to the Actionscript category and select "AS3 settings"
Press the red button to browse to your .swc file.
Also have the SDK in your directory.
Then change your imports to this;
import com.google.maps.LatLng;
import com.google.maps.overlays.Marker;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.controls.*;
You forgot to add one, and also you were importing the Controls folder and not the contents. ...And your map should debug perfectly. Happy Mapping! -
Over query limit while integrating google maps
Hi
I am getting over query limit error when i want to display more than 11 records while integrating google maps in obiee. I can display upto 11 records in the map.If i increase the row limit its throwing the error.
Error: Geocode was not succesfull for the following reason: Over_query_limit
How to overcome this error,in order to fetch more than 11 records in the map?
I have only two columns in the report
state code || No.Of Customers
In narrative view i have the following code
Replace ?!? with <
Prefix part
?!?script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
?!?/script>
?!?script type="text/javascript">
var geocoder;
var map;
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(37.4219720, -122.0841430);
var myOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
GetMapAdress ();
function showAddress(address,comment) {
if (geocoder) {
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
var infowindow = new google.maps.InfoWindow({
content:comment
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
} else {
alert("Geocode was not successful for the following reason: " + status);
function GetMapAdress (){
Narrative:
showAddress('@1', ' No Of customers are @2');
Postfix part:
?!?/script>
?!?script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript">?!?/script>
?!?script type="text/javascript">
$(document).ready( function(){initialize();return false;});
?!?/script>
?!?body onunload="GUnload()">
?!?div id="map_canvas" style="width: 800px; height: 700px" > ?!?/div>
?!?/body>
This gives the count as per the state in the google map, if we click a state it will show us the count, but its holding good only for 11 records in the map
Appreciate your responseI haven't yet used the tag. It looks quite interesting.
I had a look at the
cf_googleMap
Documentation out of curiosity. Apparently, putting
<cf_googlemapshow/> at the end, just before the closing body
tag, solves a number of Javascript issues. -
How to Show custom image on Google Map Oracle Apex 4.1 page
Hi.. All,
Need to show custom Image (From Database Table which is a BLOB Column) as Marker on Google Map with fixed size if we zoom in or zoom out.
I am using Apex 4.1 and oracle11g r2.
Thanks in AdvanceHello,
This plugin Does Exactly What You Need.
http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/extension-warp11-gmaps-item_109.html
Please read the comments on the plugin, in case you come across problem in running the plugin....
Best Regards,
Fateh
If you believe that my answer was correct, then please mark the answer as correct. This is for the best of all -
Hello, I ve recently down loaded google maps ver 4.4 and when I try to launch it, I get a message network unavailable this app requires a data connection and some blackberrys require reconfiguration to work. I have been into the local 3 shop and they told me I need to subscribe to blackberry an additional £5/ month to make the app work is this correct ? Or how do I get the app working ?
keithbr13 wrote:
they told me I need to subscribe to blackberry an additional £5/ month to make the app work is this correct ?
This is correct, you must have the BlackBerry Data Plan for most all BlackBerry Data functions.
Your GPS will still work to locate you via a Lat-Long location, but to download the mapping data for Google Maps or BlackBerry Maps, you must have that specific data plan.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code
Maybe you are looking for
-
Can I use multiple iPhoto libraries with Aperture?
I've been using iPhoto to manage my photos (successfully) for many years. I have multiple themed iPhoto libraries with many thousands of photos in them (ten years' worth of digital plus another fifty years scanned). I am thinking of downloading Ape
-
Can't print. Network Host is Busy or Unable to Connect to Printer 10.6.4
This started yesterday. I had made no changes to my network. I get this error, and cannot print from my MacBook Pro running 10.6.5 wirelessly. I print using the IP address of the printer. (10.0.1.2) The printer is a Brother (drivers updated), connect
-
Hi, I am having an issue in Unit Testing of Function Module. The issue is that Interface parameter of FM is not accessed in subroutine as the parameter goes like a field symbol. I get a dump while try to access the Interface parameter. Can anyone ple
-
Equium A60-199 randomly shutting down -could it be overheating issue
Hi I am posting on behalf of a friend who has been experiencing her A60 laptop shutting down unexpectedlly.. ( she said it shut down after a few mins or when she tried opening Firefox) Syst Details Toshiba Equium A60-199 Model No: PSA67E -00J00C8J 18
-
Oracle workflow install question
i have installed oracle workflow that embeded in oracle9i integration(version2.6.0.1). every thing is ok,but when i connect(open remote db) to oracle db in oracle workflow client,it reture a error: "language isn't enabled.....". my db language charse