I am using gmlib in a delphi application and it's living up to my needs. I load markers form a table of coordinates, but now I want to replace the default marker style. Since I am doing this all in code, I don't have any gmmarker items. My code is looped simply:
gmmarker1.Add(qryPoints.FieldByName('lat').AsFloat,qryPoints.FieldByName('lon').AsFloat,address);
when I try to change the icon using:
gmmarker1.Items[0].Icon:='c:\measle.png';
I get an error 'Argument out of range'
Is it possible to change the default icon without adding an item to the marker? Or am I doing this wrong?
The Add method of TGMMarker returns a TMarker object. You can use it to assign more properties like Icon property. However, gmmarker1.Items[0].Icon or gmmarker1[0].Icon must be work if exists any marker. Check gmmarker1.Count before
Related
I need to add a clickable button with a custom image on top of the TMapView, is this possible?
ps: even if I leave the TImage on top of the view, the map overlays it, that is, the button appears quickly until the map rendering overlays it...
edit ps2: There is no code for the example, I simply put a TImage on the Form, either as a child of TMapView, or as a child of TForm, when I test it on android, when opening the app the image appears quickly before the map and then when the map starts to appear it overlays the image...
edit ps3: I don't know if a TImage is the correct way to do this, is this any component to leave on top of the map, that keeps showing up, serving as a button? Just like on Google Maps...
You can't show anything on TMapView because of "z-order" problem. I looked for while to find a solution.
See : Delphi object over TMapView
I need to write some text in openLayers 3... Not a label, something like a text object, that I can select and drag around the map. This text must have multiple lines.
I tried to use a point with ol.style.text, but it isn't multiline.
I also tried the popups, but I need the text to be always displayed.
Is there any way to use a text feature for this (ol.format.TextFeature)?
Is there any object that I can use for that purpose?
Thanks!!
You can use an ol.Overlay for that. An overlay is basically anything an Element can be. It has a position an positioning that can be set at any time.
See an example: http://openlayers.org/en/v3.9.0/examples/overlay.html?q=overlay
You could use map browser events (pointerdown, pointerup) and if the target is your overlay element then you could move it around and update its position.
I want to display a tooltip when I click a line graph, along with the usual tooltip with the value.
Is there any way to link from the canvas to the key area?!
Are you referring to the interactive key?
http://www.rgraph.net/docs/interactive-keys.html
It's not a tooltip though - it highlights an entry on the key.
EDIT:
There's an example of a poly object that has been positioned to sit over the line(s) and which when clicked highlights the appropriate key entry. It wasn't simple to accomplish (lots of playing with coordinates) - but neither was it like trying to remember your wifes birthday when drunk:
http://www.rgraph.net/tests/spline-key-clickable.html
I'm using Gmaps4rails to display a google map in my rails application. I have a list of locations displayed correctly on the map, but when I click one of the points, the balloon which pops up doesn't show the information I want displayed. I don't think it would be hard to change the data/format of the balloon information, but I can't find where this balloon information is stored!
What files within Gmaps4rails define what information is displayed in the balloon when a point on the map is clicked?
You must redefine gmaps4rails_infowindow method in your model, for example:
def gmaps4rails_infowindow
"<h1>#{self.name}</h1><p>#{self.address}</p><p>#{self.description}</p>"
end
Security Warning
Is there any way to define my image map areas so that a tooltip will pop up when the area is moused over?
I am editing my page in dreamweaver and I have tryed the spry tooltips but the triggers won't assign to my polygon area.
Thanks
On the Area element of a Map you can specify both Title and Alt attribute. I would suggest setting both to the same text, since some older browsers have been known to mis-implement the spec for these.
http://www.w3schools.com/TAGS/tag_area.asp