Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
75b668f3
Commit
75b668f3
authored
May 29, 2018
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drawing button
parent
44a74f0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
map.css
catalog/static/css/map.css
+5
-0
sidtMap.js
catalog/static/js/sidtMap.js
+18
-4
map.html
catalog/templates/map.html
+5
-2
No files found.
catalog/static/css/map.css
View file @
75b668f3
...
@@ -25,3 +25,8 @@ html, body
...
@@ -25,3 +25,8 @@ html, body
background-color
:
rgba
(
220
,
220
,
220
,
0.9
);
background-color
:
rgba
(
220
,
220
,
220
,
0.9
);
float
:
right
;
float
:
right
;
}
}
#div-draw-btn
{
text-align
:
center
;
}
\ No newline at end of file
catalog/static/js/sidtMap.js
View file @
75b668f3
...
@@ -105,20 +105,22 @@ function sidtMap(divID, lng, lat, z)
...
@@ -105,20 +105,22 @@ function sidtMap(divID, lng, lat, z)
this
.
map
.
on
(
"pointermove"
,
function
(
e
){
self
.
onMousemove
(
e
)});
this
.
map
.
on
(
"pointermove"
,
function
(
e
){
self
.
onMousemove
(
e
)});
};
};
sidtMap
.
prototype
=
Object
.
create
(
OpenStreetMapsClass
.
prototype
);
sidtMap
.
prototype
=
Object
.
create
(
OpenStreetMapsClass
.
prototype
);
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
sidtMap
.
prototype
.
addInteraction
=
function
()
sidtMap
.
prototype
.
draw
=
function
()
{
{
var
self
=
this
;
var
self
=
this
;
this
.
interaction
=
new
ol
.
interaction
.
Draw
({
this
.
interaction
=
new
ol
.
interaction
.
Draw
({
source
:
this
.
vectorLayer
.
getSource
(),
source
:
this
.
vectorLayer
.
getSource
(),
features
:
this
.
features
,
features
:
this
.
features
,
type
:
"Polygon"
type
:
"Polygon"
});
});
this
.
interaction
.
on
(
"drawend"
,
function
(
e
){
this
.
interaction
.
on
(
"drawend"
,
function
(
e
){
self
.
showCoords
(
e
.
feature
.
getGeometry
());
self
.
showCoords
(
e
.
feature
.
getGeometry
());
self
.
map
.
removeInteraction
(
self
.
interaction
);
});
});
this
.
interaction
.
on
(
"drawstart"
,
function
(
e
){
this
.
interaction
.
on
(
"drawstart"
,
function
(
e
){
...
@@ -127,6 +129,18 @@ sidtMap.prototype.addInteraction = function()
...
@@ -127,6 +129,18 @@ sidtMap.prototype.addInteraction = function()
this
.
map
.
addInteraction
(
this
.
interaction
);
this
.
map
.
addInteraction
(
this
.
interaction
);
}
}
sidtMap
.
prototype
.
addInteraction
=
function
()
{
var
self
=
this
;
this
.
interactionSelect
=
new
ol
.
interaction
.
Select
({
condition
:
ol
.
events
.
condition
.
pointerMove
});
this
.
map
.
addInteraction
(
this
.
interactionSelect
);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
sidtMap
.
prototype
.
onMousemove
=
function
(
e
)
sidtMap
.
prototype
.
onMousemove
=
function
(
e
)
{
{
...
...
catalog/templates/map.html
View file @
75b668f3
...
@@ -199,8 +199,7 @@
...
@@ -199,8 +199,7 @@
<li>
<li>
<a
href=
"#"
>
<a
href=
"#"
>
<span>
<span>
<i
class=
"fa fa-search"
></i>
<button
type=
"submit"
name=
"search"
id=
"search-btn"
class=
"btn btn-primary"
><i
class=
"fa fa-search"
></i>
Search
</button>
<button
type=
"submit"
name=
"search"
id=
"search-btn"
class=
"btn btn-primary"
>
Search
</button>
<!-- <button name="search" id="search-btn" class="btn btn-primary">Search</button> -->
<!-- <button name="search" id="search-btn" class="btn btn-primary">Search</button> -->
</span>
</span>
</a>
</a>
...
@@ -212,6 +211,10 @@
...
@@ -212,6 +211,10 @@
</ul>
</ul>
</form>
</form>
</div>
</div>
<div
id=
"div-draw-btn"
>
<button
type=
"submit"
name=
"draw"
id=
"draw-btn"
class=
"btn btn-primary"
onclick=
"osmap.draw()"
><i
class=
"fa fa-object-ungroup"
></i>
Dibujar
</button>
</div>
<!-- form-group-->
<!-- form-group-->
{% endblock %}
{% endblock %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment